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

oracle Set ÃüÁî½éÉÜ

oracle Set ÃüÁî½éÉÜ
http://luoke920.javaeye.com/blog/323743
1). ÉèÖõ±Ç°sessionÊÇ·ñ¶ÔÐ޸ĵÄÊý¾Ý½øÐÐ×Ô¶¯Ìá½»
SQL>SET AUTO[COMMIT] {ON|OFF|IMM[EDIATE]| n}
2)£®ÔÚÓÃstartÃüÁîÖ´ÐÐÒ»¸ösql½Å±¾Ê±£¬ÊÇ·ñÏÔʾ½Å±¾ÖÐÕýÔÚÖ´ÐеÄSQLÓï¾ä
SQL> SET ECHO {ON|OFF}
3).ÊÇ·ñÏÔʾµ±Ç°sqlÓï¾ä²éѯ»òÐ޸ĵÄÐÐÊý
SQL> SET FEED[BACK] {6|n|ON|OFF}
ĬÈÏÖ»Óнá¹û´óÓÚ6ÐÐʱ²ÅÏÔʾ½á¹ûµÄÐÐÊý¡£Èç¹ûset feedback 1 £¬Ôò²»¹Ü²éѯµ½¶àÉÙÐж¼·µ»Ø¡£µ±Îªoff ʱ£¬Ò»Âɲ»ÏÔʾ²éѯµÄÐÐÊý
4).ÊÇ·ñÏÔʾÁбêÌâ
SQL> SET HEA[DING] {ON|OFF}
µ±set heading off ʱ£¬ÔÚÿҳµÄÉÏÃæ²»ÏÔʾÁбêÌ⣬¶øÊÇÒÔ¿Õ°×ÐдúÌæ
5).ÉèÖÃÒ»ÐпÉÒÔÈÝÄɵÄ×Ö·ûÊý
SQL> SET LIN[ESIZE] {80|n}
Èç¹ûÒ»ÐеÄÊä³öÄÚÈÝ´óÓÚÉèÖõÄÒ»ÐпÉÈÝÄɵÄ×Ö·ûÊý£¬ÔòÕÛÐÐÏÔʾ¡£
6).ÉèÖÃÒ³ÓëÒ³Ö®¼äµÄ·Ö¸ô
SQL> SET NEWP[AGE] {1|n|NONE}
µ±set newpage 0 ʱ£¬»áÔÚÿҳµÄ¿ªÍ·ÓÐÒ»¸öСµÄºÚ·½¿ò¡£
µ±set newpage n ʱ£¬»áÔÚÒ³ºÍÒ³Ö®¼ä¸ô×Ån¸ö¿ÕÐС£
µ±set newpage none ʱ£¬»áÔÚÒ³ºÍÒ³Ö®¼äûÓÐÈκμä¸ô¡£
7).ÏÔʾʱ£¬ÓÃtextÖµ´úÌæNULLÖµ
SQL> SET NULL text
8).ÉèÖÃÒ»Ò³ÓжàÉÙÐÐÊý
SQL> SET PAGES[IZE] {24|n}
Èç¹ûÉèΪ0£¬ÔòËùÓеÄÊä³öÄÚÈÝΪһҳ²¢ÇÒ²»ÏÔʾÁбêÌâ
9).ÊÇ·ñÏÔʾÓÃDBMS_OUTPUT.PUT_LINE°ü½øÐÐÊä³öµÄÐÅÏ¢¡£
SQL> SET SERVEROUT[PUT] {ON|OFF}
ÔÚ±àд´æ´¢¹ý³Ìʱ£¬ÎÒÃÇÓÐʱ»áÓÃdbms_output.put_line½«±ØÒªµÄÐÅÏ¢Êä³ö£¬ÒÔ±ã¶Ô´æ´¢¹ý³Ì½øÐе÷ÊÔ£¬Ö»Óн«serveroutput±äÁ¿ÉèΪonºó£¬ÐÅÏ¢²ÅÄÜÏÔʾÔÚÆÁÄ»ÉÏ¡£
10£©SQL> SET WRA[P] {ON|OFF}
µ±Êä³öµÄÐеij¤¶È´óÓÚÉèÖõÄÐеij¤¶Èʱ£¨ÓÃset linesize nÃüÁîÉèÖã©£¬µ±set wrap onʱ£¬Êä³öÐеĶàÓÚµÄ×Ö·û»áÁíÆðÒ»ÐÐÏÔʾ£¬·ñÔò£¬»á½«Êä³öÐеĶàÓÚ×Ö·ûÇгý£¬²»ÓèÏÔʾ¡£
11).ÊÇ·ñÔÚÆÁÄ»ÉÏÏÔʾÊä³öµÄÄÚÈÝ£¬Ö÷ÒªÓÃÓëSPOOL½áºÏʹÓá£
SQL> SET TERM[OUT] {ON|OFF}
ÔÚÓÃspoolÃüÁһ¸ö´ó±íÖеÄÄÚÈÝÊä³öµ½Ò»¸öÎļþÖÐʱ£¬½«ÄÚÈÝÊä³öÔÚÆÁÄ»ÉÏ»áºÄ·Ñ´óÁ¿µÄʱ¼ä£¬ÉèÖÃset termspool offºó£¬ÔòÊä³öµÄÄÚÈÝÖ»»á±£´æÔÚÊä³öÎļþÖУ¬²»»áÏÔʾÔÚÆÁÄ»ÉÏ£¬¼«´óµÄÌá¸ßÁËspoolµÄËٶȡ£
12).½«SPOOLÊä³öÖÐÿÐкóÃæ¶àÓàµÄ¿Õ¸ñÈ¥µô
SQL> SET TRIMS[OUT] {ON|OFF}
13)ÏÔʾÿ¸ösqlÓï¾ä»¨·ÑµÄÖ´ÐÐʱ¼ä
set TIMING {ON|OFF}
14). Óöµ½¿ÕÐÐʱ²»ÈÏΪÓï¾äÒѾ­½áÊø£¬´ÓºóÐøÐнÓ×ŶÁÈë¡£


Ïà¹ØÎĵµ£º

oracleµÄ±íµÄÖÖÀà

±íÀàÐÍ£º
1¶Ñ×éÖ¯±í£¨heap organized table£©£ºÕâЩ¾ÍÊÇ“ÆÕͨ”µÄ±ê×¼Êý¾Ý¿â±í¡£Êý¾ÝÒԶѵķ½Ê½¹ÜÀí¡£¶Ñ£¨heap£©ÊÇÒ»×é¿Õ¼ä£¬ÒÔÒ»ÖÖÓÐЩËæ»úµÄ·½Ê½Ê¹Óá£
2Ë÷Òý×éÖ¯±í£¨index organized table£©£ºÕâЩ±í°´Ë÷Òý½á¹¹´æ´¢¡£Õâ¾ÍÇ¿ÖÆÒªÇóÐб¾ÉíÓÐijÖÖÎïÀí˳Ðò¡£Ë÷Òý×éÖ¯±íIOTÖУ¬Êý¾ÝÒª¸ù¾ÝÖ÷¼üÓÐÐòµØ´æ´¢¡£
3Ë÷Ò ......

ORACLE 10 (¸¶Ê×ê¿)ѧϰ±Ê¼Ç µÚ2½Ú ÃüÁî¡£

ORACLE 10 ѧϰ±Ê¼Ç-µÚ2½Ú-ÃüÁî¡£
1. inner join / left join/ right join / full join
select a.dname, b.ename from dept a, emp b where a.deptno=b.deptno and a.deptno=10;
select a.dname, b.ename from dept a inner join emp b
on a.deptno=b.deptno and a.deptno=10;
select dname,ename from dept natural ......

oracle ֮ϵͳ±í µãµÎ »ýÀÛ

²é¿´ÕýÔÚÖ´ÐеÄsqlÓï¾ä
SELECT osuser, username, sql_text from v$session a, v$sqltext b where a.sql_address =b.address order by address, piece;
²¶×½ÔËÐкܾõÄSQL
 select username,sid,opname, round(sofar*100 / totalwork,0) || '%' as progress, time_remaining,sql_text from v$session_longops , v$ ......

Oracle£ºexp£¬imp Êý¾Ýµ¼Èëµ¼³ö

°´±í·½Ê½µÄµ¼³ö£¬µ¼Èë
exp SYSTEM/SYSTEM@SBJSDB00 TABLES=KOKAN90.MASTER_SEND_LIMIT LOG=C:\A.LOG
IMP SYSTEM/SYSTEM@SBJSDB00 IGNORE=Y FULL=Y LOG=C:\B.LOG
֮ǰÓùýºÜ¶àÓï¾ä¶¼±¨´í£¬µÃµ½µÄ½ÌѵÊÇ ÏÈÖ´ÐÐexp SYSTEM/SYSTEM@SBJSDB00£¬°´Ìáʾһ²½²½ÊäÈë³É¹¦¹ýºó£¬ÔÙ°ÑÌáʾ·­Òë³É²ÎÊýºÍ²ÎÊýÖµ
¹ØÓÚ²ÎÊý˵Ã÷Óà exp hel ......

Oracle¸ß¼¶¼¼ÇÉ

1.ÔÚɾ³ýÒ»¸ö±íÖеÄÈ«²¿Êý¾Ýʱ£¬ÐëʹÓÃTRUNCATE TABLE ±íÃû;ÒòΪÓÃDROP TABLE£¬DELETE * from ±íÃûʱ£¬TABLESPACE±í¿Õ¼ä¸Ã±íµÄÕ¼Óÿռ䲢δÊÍ·Å£¬·´¸´¼¸´ÎDROP£¬DELETE²Ù×÷ºó£¬¸ÃTABLESPACEÉÏ°ÙÕ׵Ŀռä¾Í±»ºÄ¹âÁË¡£
¡¡¡¡
¡¡¡¡2.having ×Ó¾äµÄÓ÷¨
¡¡¡¡
¡¡¡¡having ×Ó¾ä¶Ô group by ×Ó¾äËùÈ·¶¨µÄÐÐ×é½øÐпØÖÆ,having ×Ó ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ