Select * from UserInfo where uif_UserCode in (1,12) ÓÃinÔÚÊý¾ÝÁ¿´óµÄʱºòЧÂʲ»¸ß£¬(1ºÍ12ÊÇ´«¹ýÀ´µÄÖµ)³ýÁËÕâÖÖ·½·¨»¹¿ÉÒÔÔõôд£¬ ÓÐÈË˵ÓÃexists µ½µ×ÒªÔõÃ´Ð´ÄØ ?ÁбíÖµ²»¶à£¬ÓÃinÐÔÄÜҲɶ´ó²»Á赀 ÆäʵÁбíÏî²»¶à£¬in ºÍexists²î±ðºÜС Èç¹ûÒªÓÃexists±ØÐë´æÔÚÁíÒ»¸ö±íÖУ¬uif_UserCodeÉϽ¨Á¢Ë÷Òý¡£ Select * from UserInfo a where exists( select 1 from tempUserInfo b where a.uif_UserCode =b.uif_UserCode )
in µÄ»°Ö»Òª·¶Î§²»´ó¸úexists¹Ø¼ü×ֲ¶à
ÒªÊÇ·¶Î§´óµÄ»° ¿ÉÒÔ¿¼ÂÇexists,¿ÉÒÔ½¨Ë÷Òý°É Select * from UserInfo a where exists(select 1 from UserInfo where a.UserCode=UserCode) Select * from UserInfo where uif_UserCode in (1,12)
¸Ä³É Select * from UserInfo where uif_UserCode=1 or uif_UserCode=12
Íü¼ÇÄĸöЧÂʸßÁË£¬ºÇºÇ£¬ÄãÊÔÊÔ
´«µÄ1ºÍ12²»Êǹ̶¨µÄ£¬ÓпÉÄÜ»¹»áÊÇ3¸öÊý»òÕ߸ü¶àÄØ£¿ Èç¹û²»ÓÃexists»¹ÓÐʲô¸üºÃµÄ·½·¨Â𣿠Select * from UserInfo where uif_UserCode=1 or uif_UserCode=12
ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡ ORA-01034:ORACLE not available ORA-27101:shared memory realm does not exist ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡