Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

oracle×ܽá

²éѯ£ºselectÓï¾ä£¬¶à±í²éѯ£¬group by ·Ö×飬having ¶Ô·Ö×éºóµÄÿһ¸ö×é½øÐйýÂË£¬order by ÅÅÐò¡£(selectÓï¾ä¶à±í²éѯÕâ¸ö×îÖØÒª)
DMLÓï¾ä£ºinsert into emp() values(),insert into emp (select * from emp2),
    delete from emp where...
    update emp set sal =.. where ..
rollback;»Ö¸´¾ÉÓÐÊý¾Ý
TansactionÊÂÎñ£ºÖ÷ÒªÊÇcommitÎÊÌâ
DDLÓï¾ä£ºcreate table ±íÃû£¨Êý¾Ý£©
    create view v$_ÊÔͼÃû£¨Êý¾Ý£©
    create index Ë÷ÒýÃû on ±íÃû(×Ö¶Î)£»
±íµÄÔ¼ÊøÌõ¼þ£º1.not null 2.unique 3.primary 4.foreign 5.check
Ð޸ıí½á¹¹£ºalter table ±íÃû add(×Ö¶Î);
    alter table ±íÃû modify(×Ö¶Î);
    alter table ±íÃû drop(×Ö¶Î)£»
    alter table ±íÃû add constrain Ô¼ÊøÌõ¼þ£»
    alter table ±íÃû drop constrain Ô¼ÊøÌõ¼þ£»
ɾ³ý±í£ºdrop table ±íÃû£»
ɾÊÓͼ£ºdrop view ÊÓͼÃû£»
ɾË÷Òý£ºdrop index Ë÷ÒýÃû£»
´´½¨ÐòÁУº(ʵÏÖ´úÀíÖ÷¼ü)
Àý×Ó£ºcreate sequence ÐòÁÐÃû start with 1 increament by 1;
    ÐòÁÐÃû.currval £º µÃµ½µ±Ç°µÄÐòÁкţ»
    ÐòÁÐÃû.nextval : µÃµ½ÏÂÒ»¸öÐòÁкţ»
µÚÒ»·¶Ê½£ºÒªÓÐÖ÷¼ü£¬Áв»¿É·Ö£»
µÚ¶þ·¶Ê½£ºÂú×ãµÚÒ»·¶Ê½£¬ÇÒ ²»´æÔÚ²¿·ÖÒÀÀµ£»
µÚÈý·¶Ê½£ºÂú×ãµÚ¶þ·¶Ê½£¬ÇÒ ²»´æÔÚ´«µÝÒÀÀµ£»
¶¯Ì¬²úÆ·ÊôÐÔµÄÌí¼Ó£º
±í1£º²úÆ·±í
Id
²úÆ·Ãû
1
Æ»¹û
2
Æû³µ
3
Ò·þ
±í2£ºÊôÐÔ±í£º
Pid
ÊôÐÔÃû
1
ÑÕÉ«
2
Æ·ÖÖ
3
³µÖØ
±í3£º¹Øϵ±í£º
Id
Pid
ÊôÐÔÖµ
1
2
ºÃ
2
3
4¶Ö
3
1
ºì
µ±ÊôÐÔ±íÖж¯Ì¬µÄÌí¼ÓÊôÐÔʱ¾Í²»ÐèÒª¸Ä±ä²úÆ·±íÁË£»ÕâÑù²úÆ·±íºÍÊôÐÔ±í¾Í¿ÉÒÔÏ໥¶ÀÁ¢ÁË£»
pL/SQLÓï¾ä²Î¿¼µÚÎåÕÂchapter_5
ÓαêµÄ¹Ø¼ü×Ö£ºcursor£º´æ´¢µÄÊÇÊý¾ÝµÄ½á¹û¼¯ºÏ£»
Ê÷×´ÏÔʾ——1£¬pid£¨parent_id£©,id,rootid £»2,±àºÅ·½Ê½
·½·¨Ò»£ºÊ¹ÓÃpid = id ÒÀ´ÎÕÒµ½¸Ã½ÚµãϵÄ×Ó½Úµã
·½·¨¶þ£ºÊ¹ÓñàºÅ£ºÈç000000±íʾµÚÒ»²ã£¬Æä×Ó½ÚµãΪ000100£¬000200£¬000300µÈ£¬¶ø000100µÄ×Ó½ÚµãΪ000101ºÍ000102µÈ£»ÕâÑù¿ÉÒÔ°´ÕÕÕâ¸ö±àºÅµÄ´óС°ÑÕû¸öÊý¾ÝÄóöÀ´£»
´æ´¢Æ÷µÄ¹Ø¼ü×Ö£ºprocedure : ¶¨ÒåÒ»¿éÓï¾ä¿é£»¸øÒ»¿éÓï¾ä¿éÆðÃû×Ö£»¿ÉÒÔʵÏֵݹ飻
Ö´ÐÐprocedureÓï¾ä£º1£¬exec ´æ´¢Æ÷Ãû£»2£¬begin ´æ´¢Æ÷Ãû; end;
´ø²ÎÊýµÄ´æ´¢Æ÷£º²ÎÊý£º in Ò²¾ÍÊÇĬÈÏģʽ,´«Èëģʽ £


Ïà¹ØÎĵµ£º

Oracle USERENVºÍsys_context

1.USEREVN()
·µ»Øµ±Ç°Óû§»·¾³µÄÐÅÏ¢,opt¿ÉÒÔÊÇ:
ENTRYID,SESSIONID,TERMINAL,ISDBA,LABLE,LANGUAGE,CLIENT_INFO,LANG,VSIZE
1.ISDBA   ²é¿´µ±Ç°Óû§ÊÇ·ñÊÇDBAÈç¹ûÊÇÔò·µ»Øtrue
SQL> select userenv('isdba') from dual;
USEREN
------
FALSE
2.SESSION ·µ»Ø»á»°±êÖ¾
SQL> select userenv('sessio ......

¼×¹ÇÎÄÍƳöOracle PeopleSoft Enterprise 9.1

ΪÁË°ïÖúÆóÒµÌá¸ßÔ±¹¤Ð§Á¦£¬¼×¹ÇÎĹ«Ë¾ÈÕÇ°ÔÚ2009¼×¹ÇÎÄÈ«Çò´ó»áÉÏÍƳö×îаæOracle PeopleSoft Enterprise¹ÜÀíÈí¼þ£¬¼´PeopleSoft EnterpriseÈËÁ¦×ʱ¾¹ÜÀí9.1¡¢PeopleSoft Enterprise PeopleTools 8.50¡¢PeopleSoft Enterpriseѧϰ¹ÜÀí9.1ºÍPeopleSoft EnterpriseÃÅ»§9.1¡£¡¡¡¡Õâ¸öÎüÊÕÁËÀ´×Ô150¶à¸ö¿Í»§µÄ·´À¡ÐÅÏ¢ ¶ø¿ª·¢ ......

raw oracleÈ«½â

1£®Ê²Ã´½Ð×öÂãÉ豸£¿
¡¡¡¡ÂãÉ豸£¬Ò²½ÐÂã·ÖÇø£¨Ô­Ê¼·ÖÇø£©£¬ÊÇÒ»ÖÖûÓо­¹ý¸ñʽ»¯£¬²»±»Unixͨ¹ýÎļþϵͳÀ´¶ÁÈ¡µÄÌØÊâ×Ö·ûÉ豸¡£ËüÓÉÓ¦ÓóÌÐò¸ºÔð¶ÔËü½øÐжÁд²Ù×÷¡£²»¾­¹ýÎļþϵͳµÄ»º³å¡£
¡¡¡¡
¡¡¡¡2£®ÈçºÎ±æ±ðÂãÉ豸£¿
¡¡¡¡ÔÚUnixµÄ/dev Ŀ¼Ï£¬ÓÐÐí¶àÎļþ£¬ÆäÖÐÓÐÁ½¸ö´óÀࣺ×Ö·ûÉ豸ÎļþºÍ¿éÉ豸Îļþ¡£
¡¡¡¡× ......

ORACLE NULLÏê½â

ÎÊ£ºÊ²Ã´ÊÇNULL£¿
´ð£ºÔÚÎÒÃDz»ÖªµÀ¾ßÌåÓÐʲôÊý¾ÝµÄʱºò£¬Ò²¼´Î´Öª£¬¿ÉÒÔÓÃNULL£¬ÎÒÃdzÆËüΪ¿Õ£¬ORACLEÖУ¬º¬ÓпÕÖµµÄ±íÁ㤶ÈΪÁã¡£
 
ORACLEÔÊÐíÈκÎÒ»ÖÖÊý¾ÝÀàÐ͵Ä×Ö¶ÎΪ¿Õ£¬³ýÁËÒÔÏÂÁ½ÖÖÇé¿ö£º
1¡¢Ö÷¼ü×ֶΣ¨primary key£©£¬
2¡¢¶¨ÒåʱÒѾ­¼ÓÁËNOT NULLÏÞÖÆÌõ¼þµÄ×Ö¶Î
˵Ã÷£º
1¡¢µÈ¼ÛÓÚûÓÐÈκÎÖµ¡¢ÊÇδ֪ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ