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

ORACLEÍâÁ¬½ÓС½á~

ºÃ¼¸´ÎÏëÓõ½ÍâÁ¬½ÓµÄʱºò¶¼ÍüÁ˾ßÌåµÄÓ÷¨ÊÇÔõÑùµÄ£¬±ÈÈç˵£¨+£©¸Ã¼ÓÔڵȺŵÄÄÄÒ»¶Ë£¬»òÕßLFET OUTER JOIN¸ÃÓÃÔÚÕûÌõÓï¾äÖеÄÄĸö²¿·Ö¡£½ñÌìÕýºÃÓÖÅöµ½Ò»¸öÏà¹ØµÄÎÊÌ⣬½è´Ë»ú»á×ܽáһϣ¬ÒÔºóÒ²·½±ã²éѯ£¬²»ÓÃÿ´Î¶¼È¥°Ù¶ÈÁË¡£
//table1ºÍtable2ΪÁ½¸ö²âÊÔ±í Ëæ±ã²åÈ뼸ÌõÊý¾Ý
SQL> select * from table1;
ID NAME
---------- --------------------
1 wh
2 wp
3 wq
SQL> select * from table2;
ID NAME
---------- --------------------
4 wr
1 wh
//Õý³£²éѯ
SQL> select a.name,b.name
2 from table1 a,table2 b
3 where a.id=b.id;
NAME NAME
-------------------- --------------------
wh wh
//ÏÔʾ³ötable1ÖеÄËùÓмǼ table2ÖÐÎÞÏàÓ¦¼Ç¼ÔòÖÃNULL
SQL> select a.name,b.name
2 from table1 a,table2 b
3 where a.id=b.id(+);
NAME NAME
-------------------- --------------------
wh wh
wq
wp
//ÏÔʾ³ötable2ÖеÄËùÓмǼ table1ÖÐÎÞÏàÓ¦¼Ç¼ÔòÖÃNULL
SQL> select a.name,b.name
2 from table1 a,table2 b
3 where a.id(+)=b.id;
NAME NAME
-------------------- --------------------
wh wh
wr
//ºÇºÇ,ÕâÀï±¾Ïë³¢ÊÔÒ»ÏÂÈ«ÍâÁ¬½Ó,²»¹ýʹÓÃ(+)ºÃÏñ²»ÐÐ
SQL> select a.name,b.name
2 from table1 a,table2 b
3 where a.id(+)=b.id(+);
where a.id(+)=b.id(+)
*
ERROR at line 3:
ORA-01468: a predicate may reference only one outer-joined table
//×óÍâÁ¬½Ó
SQL> select a.name,b.name
2 from table1 a
3 left outer join table2 b
4 on a.id=b.id;
NAME NAME
-------------------- --------------------
wh wh
wq
wp
//ÓÒÍâÁ¬½Ó
SQL> select a.name,b.name
2 from table1 a
3 right outer join table2 b
4 on a.id=b.id;
NAME NAME
-------------------- --------------------
wh wh
wr
//ÓÒÍâÁ¬½Ó
SQL> select a.name,b.name
2 from table2 b
3 right outer join table1 a


Ïà¹ØÎĵµ£º

oracle ÐÞ¸Ä×Ö·û¼¯

 3oracleÊý¾Ý¿âµÄ×Ö·û¼¯¸ü¸Ä
A¡¢oracle server ¶Ë ×Ö·û¼¯²éѯ
select userenv(‘language’) from dual
ÆäÖÐNLS_CHARACTERSET Ϊserver¶Ë×Ö·û¼¯
NLS_LANGUAGE Ϊ server¶Ë×Ö·ûÏÔʾÐÎʽ
B¡¢²éѯoracle client¶ËµÄ×Ö·û¼¯
$echo $NLS_LANG
Èç¹û·¢ÏÖÄãselect ³öÀ´µÄÊý¾ÝÊÇÂÒÂ룬Çë°Ñclient¶ËµÄ×Ö· ......

linuxÏ°²×°oracle 10gʱlibXp.so.6½â¾ö·½·¨

°²×°¹ý³ÌÖгöÏÖ“X11/extensions/Print.h: No such file or directory”µÄ½â¾ö·½·¨
ÕâÊÇÒòΪϵͳÖÐȱÉÙlibXp-devel
# yum install libXp-devel
°²×°¹ý³ÌÖгöÏÖ“X11/bitmaps/gray: No such file or directory”µÄ½â¾ö·½·¨
ÕâÊÇÒòΪϵͳÖÐȱÉÙxorg-x11-xbitmaps£¨x11/xbitmaps (Ubuntu) and xorg-x1 ......

Oracle SQL TraceʹÓÃʵÀý

ΪÁËÑо¿Ò»ÏÂϵͳÔÚºǫ́¶¼¸ÉÁËʲô£¬µ±È»ÊÇÎÒÔÚ´úÂëÀïûÕÒµ½µÄÇé¿öÏ£¬Ñо¿ÁËÒ»ÏÂtrace£¬½á¹ûÓÐÒ»¶¨µÄ°ïÖú¡£oracleÖв»Ïñsql serverÖÐÄÇÑùÖ±½ÓÌṩͼÏñ»¯µÄ¹¤¾ß£¬ËùÒÔ»¹ÊǵÃ×Ô¼º¶¯ÊÖÀ´×ö£¬¹éÄÉÁËһϣ¬²½ÖèÈçÏ£º
²éѯsession£º
SQL> select sid, serial#, username from v$session where username='XXX';//ÕÒ³öÄãÒª¸ú ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ