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

Oracle SQL NULL Öµ¶Ô IN/NOT INÓï¾äµÄÓ°Ïì

  ½ñÌ죬ÓÐÒ»¸ösql NOT INÓï¾ä£¬Æ¥ÅäÌõ¼þÀïÓÐÒ»¸önull£¬½á¹ûʲô¶¼²é²»³öÀ´£¬Í¬Ê¾õµÃºÜÄÑÀí½â¡£ÆäʵֻҪÃ÷°×Ò»µã¾Í¿ÉÒÔÁË£¬INÓï¾äÆ¥ÅäµÄʱºòÊÇÓÃ=£¬NOT INÆ¥ÅäµÄʱ»áÓÃ<>£¬¾ÍºÜÈÝÒ×Àí½âÁË¡£
Ê×ÏÈÎÒÃÇÒªÖªµÀ£¬nullÔÚoracleÊǸöÌØÊâµÄ¶«Î÷£¬Ã»ÓÐÈκοɱÈÐÔ£¬Èç¹ûʹÓà =/<> ¶Ô±Ènull£¬µÃµ½µÄʼÖÕÊÇfalse¡£null ÖµÖ»ÄÜÓà is null/is not nullÀ´½øÐжԱȡ£
ÒÑÖª±ítable£º
type  value
 SC    1
 PO    4
 BO    9
select * from table where type IN£¨'SC'£¬null£©£»
Õâ¾ä»°¾ÍÏ൱ÓÚ£ºselect * from table where type='SC' or type=null;
ÒòΪÒѾ­ÓÐ type='SC'Æ¥Å䣬¶øtype=nullûÓпɱÈÐÔ£¬¿ÉÒÔÈÏΪ±»ºöÂÔÁË£¬ËùÒÔÔÚ IN Óï¾äÀïµÄ null ¿ÉÒÔÈÏΪûÓÐÒâÒå¡£
select * from table where type NOT IN£¨'SC'£¬null£©£»
Õâ¾ä»°¾ÍÏ൱ÓÚ£ºselect * from table where type!='SC' and type!=null;
ÒòΪ type!=null ·µ»ØµÄʼÖÕÊÇfalse£¬Õû¸ö²éѯÓï¾ä²»»áÆ¥ÅäÈκÎÒ»Ìõ¼Ç¼£¬ËùÒÔNOT INÓï¾äÀïµÄnull»áʹ²éѯûÓÐÈκνá¹û¡£


Ïà¹ØÎĵµ£º

ÔÚOracleÏ¿ª·¢Java³ÌÐòµÄ¾­µäÎÊÌâ½â´ð

 
ÎÊÌâÒ»£ºÈç±£¼ÓÔØJDBCÇý¶¯³ÌÐò£º
 
Õý³£ÎÒÃǼÓÔØÇý¶¯³ÌÐòÓÐÈý¸ö;¾¶£º
 
1.Class.forName(String)ÕâÏëµ±ÓÚclassLoaderÒ»¸öStringÖ¸¶¨µÄÀ࣬ÔÚ×°ÔØʱ°Ñ¸ÃÇý¶¯³ÌÐòµÄ¾²Ì¬ÄÚÈݶ¼³õʼ»¯£¬ÆäʵÕâʱÇý¶¯³ÌÐòÀàµ÷ÓÃÁËDriverManager.registerDriver(driver)·½·¨¡£
 
2.ʹÓÃϵͳÊôÐÔ£ºSystem.getPro ......

½â¶ÁOracle¼Æ»®£ºSolaris½«±»Õü¾È MySQL¼ÌÐøǰ;δ²·


¡¾51CTO.com¶À¼ÒÌظ塿Ãæ¶Ô¾ª»ÅµÄ¿Í»§ºÍ¹ã·ºÖÊÒɵÄýÌ壬Oracle¹Ù·½×î½üÖÕÓÚ³ö°ñ°²Ãñ£¬ÄDZãÊÇÒ»¸öÒÔ“SUN CUSTOMERS ,Oracle Plans To£º”Ϊ´ó±êÌâµÄ¹ã¸æ¡£Ö±Òë¹ýÀ´±ã¹ýÀ´¿ÉÖªµÀ£¬Oracle½«Òª¼Ó´óSPARCºÍSolarisµÄͶÈëÁË£¬¶ø´óÀÏ°å°£ÀïÉ­Ò²ÏòIBMÓ²¼þÏÂÁËÕ½Ê飬Éù³ÆOracle½«×îÖÕÓ®µÃÕⳡ¾ºÕù……
&n ......

MYSQLºÍORACLEµÄһЩ²Ù×÷Çø±ð

ÓкܶàÓ¦ÓÃÏîÄ¿, ¸ÕÆð²½µÄʱºòÓÃMYSQLÊý¾Ý¿â»ù±¾ÉÏÄÜʵÏÖ¸÷ÖÖ¹¦ÄÜÐèÇó£¬Ëæ×ÅÓ¦ÓÃÓû§µÄÔö¶à£¬Êý¾ÝÁ¿µÄÔö¼Ó£¬MYSQL½¥½¥µØ³öÏÖ²»¿°ÖظºµÄÇé¿ö£º
Á¬½ÓºÜÂýÉõÖÁå´»ú£¬ÓÚÊǾÍÓаÑÊý¾Ý´ÓMYSQLǨµ½ORACLEµÄÐèÇó£¬Ó¦ÓóÌÐòÒ²ÒªÏàÓ¦×öһЩÐ޸ġ£±¾ÈË×ܽá³öÒÔϼ¸µã×¢ÒâÊÂÏϣÍû¶Ô´ó¼ÒÓÐËù°ïÖú¡£
1£® ×Ô¶¯Ôö³¤µÄÊý¾ÝÀàÐ ......

sqlserver:openrowset / oracle:table/view@dblinkÃû

Ö»ÊÇsqlserver ÌṩµÄÔ¶³ÌÊý¾Ý·ÃÎʺ¯Êý;  ÔÚ±¾µØsqlserver ÖÐÈ¡ÍⲿÊý¾ÝÔ´Êý¾Ýʱºò¿ÉÓÃ;
¶ÔÁ¬½Ó±¾µØ oracle ²Ù×÷Ô¶³Ì oracle ²»ÄÜʹÓÃ; ²âÊÔ: pl/sql ÖÐʹÓÃ:
select * from openrowset(................); ÎÞЧ!!!!!!!!!!!!!!
ÔÚoracle ÖÐÐèÒª·ÃÎÊÔ¶³ÌÊý¾Ý,ÐèÒª½¨Á¢Ò»Á¬½ÓÔ¶³Ìoracle µÄ dblink ;
ÔÙÓÃÈçÏ·½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ