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

SQLÓï¾äЧÂÊÎÊÌâ - ÆäËûÊý¾Ý¿â¿ª·¢ / ÆäËûÊý¾Ý¿â

´ó¼Ò°ïæ¿´¿´Õâ2¸ösqlÓï¾äÄĸö²éѯµÄËٶȸü¿ìµã¡£Ð»Ð»°ïæ¡£±È½Ï׿±¡£ÔÚ×öÐÔÄܲâÊÔ¡£

select * from
  ±íA LEFT OUTER JOIN ±íB ON (±íA.id || ' ' =±íB.id) ,±íC , ±íD, ±íE
WhereÆäËûÌõ¼þ


select * from
  ±íA ,±íB ,±íC , ±íD, ±íE
Where ÆäËûÌõ¼þ and ±íA.id || ' ' =±íB.id


Èç¹û¸÷ÖÖÌõ¼þÊÇÒ»ÖµĻ°£¬ÄÚÁ¬½ÓÊÇ×î¿ìµÄ¡£¼´µÚ¶þÖÖ·½·¨

µÚ¶þÖÖÊÇËûÃÇÌṩҪ¸Ä½øµÄ·½Ê½£¬Êý¾ÝÌ«¶à¡£
Ҫд·ÖÎöÔ­Òò£¬¾ÍÊÇҪд³öΪʲô¸Ä½øÖ®ºóËٶȻá´ó·ù¶ÈÌá¸ß¡£

ÀíÂÛÉϽ²£¬Á¬½ÓÖÐÄÚÁ¬½ÓÊÇ×î¿ìµÄ£¬ÒòΪֻÓзûºÏÌõ¼þµÄ¼Ç¼²Å»áɸѡ³öÀ´

from 
  ( "A" 
  LEFT OUTER JOIN "B" ON ( "A"."id" = "B"."id" ) )
  LEFT OUTER JOIN "C" ON ( "A"."id" = "C"."id" ), "D"
 WHERE
"A"."Äê·Ý" = ?
  AND "A"."Ãû³Æ" = "D"."Ãû³Æ"
  AND "A"."ºÅÂë1" = "D"."ºÅÂë1"
  AND "A"."ºÅÂë2" = "D"."ºÅÂë2"
  AND "A"."id" = "D"."id"
..............................................
from "A" INNER JOIN "D" ON ( "A"."Ãû³Æ" = "EDA"."Ãû³Æ"
 AND "A"."ºÅÂë1" = &q


Ïà¹ØÎÊ´ð£º

Á½¸öµ¼¹¹sql serverÊý¾Ý¿â,Êý¾Ýµ¼Èëµ¼³öÎÊÌâ

ÏÖÔÚÓÐÁ½¸öÒì¹¹µÄsql serverÊý¾Ý¿â,ÎÒÏ뽫µÚÒ»¸ö±íÖеÄÊý¾Ýµ¼Èëµ½µÚ¶þ¸ö±íÖÐ,×Ô¼ºÖ¸¶¨µ¼ÈëÊý¾ÝµÄ×Ö¶Î,ÈçºÎµ¼ÈëÊý¾ÝÄØ,´ó¼ÒÌÖÂÛÒ»ÏÂ?
dts¹¤¾ß

µ¼Èëµ¼³ö¹¤¾ß.

DD

¹þ¹þ£¬¹À¼ÆÕâλÊǵØQIOU¶¼Êܲ»Á˵Ä

Ö±½ÓÐ ......

×Ü»áÅöµ½¹ÖµÄÎÊÌ⣬sqlÎÊÌâ

sql2005
select *from v_ddxx where d_sfsc='0' and (g_ssbm='1001' or g_ssbm='1002') and (xxf>0 and  xxfwzf <>0 ),Ö´ÐÐËÙ¶ÈÂýµÄÒªËÀ£¬µ«ÊÇÈç¹û°Ñ(xxf>0 and  ......

SQLÓï¾äÎÊÌ⣬¸ßÊÖ°ï棡£¡

½«Ò»¸ö±í21~30ɾ³ý£¬sqlÓï¾äÔõôд
Õâ¸öÌ«ÁýͳÁË£¬ÊÇÅÅÐòºóµÄµÚ21Ìõµ½30Ìõ¼Ç¼ɾ³ý»¹ÊÇijһÁÐÖµÔÚ21µ½30Ö®¼äµÄɾ³ý°¡£¿

21-30ÊÇʲôÒâ˼£¿×ֶεĻ°¾Ídelete from table1 where col1>=21 and col1<=30
Ö¸µ ......

ÇóÖúSQL´æ´¢¹ý³Ì

ÎÒÓÐÒ»¸öÊý¾Ý¿âÀïÃæµÄ±íÊǶ¯Ì¬Ôø¼ÓµÄ£¬Ã¿ÖÜ°´ÈÕÆÚÉú³ÉÒ»¸öбíÀ´¼Ç¼µÇ¼ÐÅÏ¢,Èçlog20090927£¨ÃüÃûÓйæÂÉ£©,¸ôÒ»ÖÜÔÙÉú³ÉÒ»¸ö
ÏÖÔÚÎÒÏëʹÓô洢¹ý³ÌÀ´²éѯËùÓеĵǼÐÅÏ¢£¬¾Í°üÀ¨ËùÓеÄÈÕÖ¾±í
¸ÃÈçºÎд²ÅºÃ
Õ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ