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

sql ÎÊÌâ - Oracle / ¿ª·¢

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 )

ÒýÓÃ
Select * from UserInfo where uif_UserCode in (1,12)
ÓÃinÔÚÊý¾ÝÁ¿´óµÄʱºòЧÂʲ»¸ß£¬(1ºÍ12ÊÇ´«¹ýÀ´µÄÖµ)³ýÁËÕâÖÖ·½·¨»¹¿ÉÒÔÔõôд£¬
ÓÐÈË˵ÓÃexists µ½µ×ÒªÔõÃ´Ð´ÄØ ?


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

Íü¼ÇÄĸöЧÂʸßÁË£¬ºÇºÇ£¬ÄãÊÔÊÔ

ÒýÓÃ

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


Ïà¹ØÎÊ´ð£º

Çë½ÌsqlÓï¾ä¡£ - Oracle / ¿ª·¢

ÎÒÓÐÒ»¸ö±í£¬½á¹¹ÊÇÕâÑù¡£
  ת³ö µ¥Î» תÈ뵥λ ±ÊÊý ½ð¶î
date(Ö÷) outid(Ö÷) inid(Ö÷) num amt
2009 1 2 1 500 Ϊ 1 µ¥Î» ÔÚ2009Ä ......

oracle²¢·¢´¦ÀíSOS - Oracle / ¿ª·¢

ÎÒÔÚ¿ª·¢µÄÕâ¸öÓ¦Óò¢·¢ÐԱȽϸߣ¬oracle¸üÐÂÊý¾ÝʱºòÈçºÎ´¦Àí²¢·¢´¦ÀíÄØ£¿¸÷λ´óÏÀ·¢±íºÃµÄ¹Ûµã°¡£¬ÔÚÏߵȴý£¡
oracleÊý¾Ý¸üÐÂʱ£¬»á×Ô¶¯Ä¬ÈÏÐÐËø¶¨£¬Â¥Ö÷²»Òª²ÙÐÄ£¬Oracle¶Ô²¢Ðд¦ÀíÒѾ­ºÜ³ÉÊìÁË

ÒýÓÃ
oracle ......

oracle 9i ×î½ü·¢Ïֵǽ±¨´í - Oracle / »ù´¡ºÍ¹ÜÀí

ÓÃPL/SQL µÇ½ʱµ¯³ö±¨´í´°¿Ú£¬´íÎóÈçÏ£¡
  ORA-01034:ORACLE not available
  ORA-27101:shared memory realm does not exist
ÇëÎÊ£¬ÓÐûÓÐÈËÓöµ½ÕâÖÖÇé¿ö£¬Ôõô½â¾ö£¿Ð»Ð»£¡

1. Oracle sid ÕýÈ ......

sql ÎÊÌâ - MS-SQL Server / »ù´¡Àà

ÐèÇóÈçÏ£º
ѧԺ academy£¨aid,aname£©
°à¼¶ class£¨cid,cname,aid£©
ѧÉú stu(sid,sname,aid,cid)
סËÞÇø region(rid,rname)
ËÞÉáÂ¥ build(bid,rid,bnote) bnoteÊÇ¡®ÄС¯/¡®Å®¡¯
ËÞÉá dorm(did,rid,bid£¬bedn ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ