oracleµÄ·ÖºÅºÍб¸Ü/ - Oracle / »ù´¡ºÍ¹ÜÀí
ÎÒµÄÀí½âÊÇ£¬¶ÔһЩblock£¬±ÈÈçdeclare, begin end £¬create procedureÖ®ÀàµÄ£¬'/'ÊDZØÐëµÄ£¬ÓÃÀ´run
¶øÒ»Ð©¼òµ¥statement£¬¡®/ '»áµ¼ÖÂÔËÐÐÁ½´Î
ÎÊÌâÊÇ£¬Ö±½ÓÓÃÒ»¸ö'/'¾Í»áÔËÐÐÁ½´Î£¬»¹ÊÇÔÚ·ÖºÅÖ®ºó»¹ÔÚÏÂÐиú×Å / ²Å»áÖ´ÐÐÁ½´Î£¿
ÁíÍ⣬Èç¹ûÒª±ÜÃâÖØ¸´Ö´Ðеϰ£¬·ÖºÅºÍб¸ÜÊDz»ÊǶþѡһ¾Í¿ÉÒÔÁË£¬Ò»°ãÑ¡ÄĸöÓÐɶϰ¹ß£¿
лл¡£
ÔÙÎÊÒ»ÏÂ
Ïñcreate procedure£¬µ½×îºóÒ²Ó¦¸ÃÓиö·ÖºÅ½áÊø£¬È»ºóÔÙ¸úÒ»¸öб¸Ü
¶ÔÕâÖÖblockµÄÕâÑùûÎÊÌâÂð£¿
Èç¹ûÊÇÓï¾äµÄ»°£¬;±íʾ½áÊø²¢ÇÒÔËÐÐ
Èç¹ûÊdzÌÐò¿é»òÕßpl¿é£¬£»±íʾ½áÊø²»ÔÊÐí£¬±ØÐë/±íʾÔËÐÐ
Â¥ÉϵÄÒѾ˵µÄºÜÇå³þÁË£¡
;ÊÇÖ´ÐÐÓï¾ä±ØÐëµÄ
/ÊÇÖ´ÐÐÓï¾ä¿é±ØÐëµÄ
Ïà¹ØÎÊ´ð£º
ÎÒÊÇÓÃÔ¶³Ì×ÀÃæÁ¬²Ù×÷·þÎñÆ÷ÉϵÄÊý¾Ý¿â¡£
ÔÚ´´½¨Ò»¸öÓû§Ö®ºó£¬ÔÙÓÃPLSQLµÇ¼£¬ÔòPLSQLËÀµôÁË¡£
ÎҹصôPLSQLÖ®ºó£¬ÓÃÆäËûÓû§Ò²²»ÄܵǼ¡£
ÎÒ°ÑoracleµÄ·þÎñÍ£Ö¹£¬½á¹û¾ÍÊÇoracleµÄ·þÎñ״̬¾ÍÍ£ÁôÔÚ¡°Í ......
ÎÒÔÚ¿ª·¢µÄÕâ¸öÓ¦Óò¢·¢ÐԱȽϸߣ¬oracle¸üÐÂÊý¾ÝʱºòÈçºÎ´¦Àí²¢·¢´¦ÀíÄØ£¿¸÷λ´óÏÀ·¢±íºÃµÄ¹Ûµã°¡£¬ÔÚÏߵȴý£¡
oracleÊý¾Ý¸üÐÂʱ£¬»á×Ô¶¯Ä¬ÈÏÐÐËø¶¨£¬Â¥Ö÷²»Òª²ÙÐÄ£¬Oracle¶Ô²¢Ðд¦ÀíÒѾºÜ³ÉÊìÁË
ÒýÓÃ
oracle ......
--½¨Á¢Ò»¸ö°üÒÔ¶¨ÒåÒ»¸öÓαê
create or replace package PK_test
as
type cur_test is ref cursor;
end PK_test;
--½¨Á¢Ò»¸ö¹ý³Ì,ͨ¹ýÊäÈëJOBID£¬·µ»ØÒ»¸ö±í¼Ç¼£¨Óα꣩!
create or replace ......
Ôõôͨ¹ýÃüÁî²é¿´×Ô¼ºÒѾ´´½¨µÄ±í£¿
select tname from tab;
SQL code:
--1.sysÓû§µÇ¼
select table_name
from dba_indexes
where table_owner = 'Óû§Ãû';
--2.ËùÓÐÓû§
select * from tab;
......
OracleÖÐÓû§ÃûÊÇʲô£¿
ÃèÊöÇå³þÒ»µã£¡
ORACLEÊý¾Ý¿âÖÐÓкܶàÄÚÖõÄÓû§Ãû£¬sys¾Í²»ËµÁË£¬»¹ÓÐscottÃÜÂëÊÇtiger.³ýÁËsys,ÆäËûÓû§¶¼ÊÇËù¶¨µÄ£¬½â³ýËø¶¨ºó²ÅÄÜʹÓá£ÔÚ±¾»úµÇ½Êý¾Ý¿âʱ£¬sysµÄÃÜÂë¿ÉÒÔËæÒâÊäÈë¡£
......