ORACLE ÓαêºÍÓαê±äÁ¿µÄÇø±ð
ÈçºÎ¶¨ÒåÓαêÀàÐÍ
TYPE ref_type_name IS REF CURSOR [RETURN return_type];
ÉùÃ÷Óαê±äÁ¿
cursor_name ref_type_name;
´Ó¼¼Êõµ×²ã¿´£¬Á½ÕßÊÇÏàͬµÄ¡£ÆÕͨplsql cursorÔÚ¶¨ÒåʱÊÇ“¾²Ì¬”µÄ¡£¶øRef cursors¿ÉÒÔ¶¯Ì¬´ò¿ª¡£
ÀýÈçÏÂÃæÀý×Ó£º
Declare
type rc is ref cursor;
cursor c is select * from dual;
l_cursor rc;
begin
if ( to_char(sysdate,'dd') = 30 ) then
open l_cursor for 'select * from emp';
elsif ( to_char(sysdate,'dd') = 29 ) then
open l_cursor for select * from dept;
else
open l_cursor for select * from dual;
end if;
open c;
end;
/
l rc¸ù¾ÝÂß¼¶¯Ì¬´ò¿ª£»¶øÓαêc¶¨ÒåºÃÁËÖ»ÓоÍÎÞ·¨ÐÞ¸ÄÁË¡£
l ref cursor¿ÉÒÔ·µ»Ø¸ø¿Í»§¶Ë£¬cursorÔò²»ÐС£
l cursor¿ÉÒÔÊÇÈ«¾ÖµÄglobal £¬ref cursorÔò±ØÐ붨ÒåÔÚ¹ý³Ì»òº¯ÊýÖС£
l ref cursor¿ÉÒÔÔÚ×Ó³ÌÐò¼ä´«µÝ£¬cursorÔò²»ÐС£
l cursorÖж¨ÒåµÄ¾²Ì¬sql±Èref cursorЧÂʸߣ¬ËùÒÔref cursorͨ³£ÓÃÔÚÏò¿Í»§¶Ë·µ»Ø½á¹û¼¯¡£
Ïà¹ØÎĵµ£º
×Ô´ÓѧORACLEÒÔÀ´¾Í´ÓÀ´Ã»Óз¢Éú¹ýʲô¹ÊÕÏ£¬±È½ÏÐÒÔË¡£ÆäʵҲ²»ÄÜËãÐÒÔË£¬ÒòΪÕâÑù¾ÍÉÙÁ˶ÍÁ¶µÄ»ú»áÁË£¬ºÇºÇ£¬Ôõô¾õµÃ×Ô¼ºÓеãÇóÅ°µÄÇãÏò……
¼´±ãÊÇÔÚѧϰbackup and recovery basicsµÄʱºò£¬Ò²Ö»ÊÇ×ö×ö±¸·ÝµÄʵÑ飬û×ö¹ý»Ö¸´£¬ÒòΪÉí±ßûÓÐÈËÖ¸µ¼£¬Ò²Ã»ÆäËûͬѧÔÚѧORACLE£¬ËùÒÔÅÂÒ»³öÎÊÌâ¿Ï¶¨ºÜÂé·³£¬½â ......
ÎÒÔÚhttp://zhidao.baidu.com/question/123262452.html?fr=msg¡¡ÌáµÄÎÊÌ⣬ÕûÀíµ½ÕâÀï¡¡·Ç³£¸Ðл zjwssg
µÄ»Ø´ð
ÅÅÐòÄÚ´æÉæ¼°µ½PGA¡£
ʲôʱºòʹÓÃ×Ô¶¯PGAÄÚ´æ¹ÜÀí£¿Ê²Ã´Ê±ºòʹÓÃÊÖ¶¯PGAÄÚ´æ¹ÜÀí£¿
°×ÌìϵͳÕý³£ÔËÐÐʱÊʺÏʹÓÃ×Ô¶¯PGAÄÚ´æ¹ÜÀí£¬ÈÃOracle¸ù¾Ýµ±Ç°¸ºÔØ×Ô¶¯¹ÜÀí¡¢·ÖÅäPGAÄÚ´æ¡£
Ò¹ÀïÓû§Êý ......
1¡¢ÐòÁж¨Òå
ORACLE:
CREATE SEQUENCE <sequence_name>
INCREMENT BY <integer>
&n ......
DML Error Logging in Oracle 10g
Ö÷ÒªÔÚÓÚʹÓÃDBMS_ERRLOG.create_error_log Õâ¸ö°üÀ´¸ú×Ùdml´íÎóÐÅÏ¢
SQL> CREATE TABLE source (
2 id NUMBER(10) NOT NULL,
3 code VARCHAR2(10),
4 description VARCHAR2(50),
5 CONSTRAINT source_pk PRIMARY KEY (id)
6 );
±íÒÑ´´½¨¡£
SQL> DECLARE
2 TYPE t_tab IS ......
×÷Õߣº ÈÕÆÚ£º2005-12-8 1:43:32 À´Ô´£ºInternet µã»÷£º´Î ÆÀÂÛ
¡¡¡¡±¾ÎÄÖ»ÌÖÂÛOracleÖÐ×î³£¼ûµÄË÷Òý£¬¼´ÊÇB-treeË÷Òý¡£±¾ÎÄÖÐÉæ¼°µÄÊý¾Ý¿â°æ±¾ÊÇOracle8i¡£
¡¡¡¡Ò». ²é¿´ÏµÍ³±íÖеÄÓû§Ë÷Òý
¡¡¡¡ÔÚOracleÖУ¬SYSTEM±íÊÇ°²×°Êý¾Ý¿âʱ×Ô¶¯½¨Á¢µÄ£¬Ëü°üº¬Êý¾Ý¿âµÄÈ«²¿Êý¾ ......