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

mssql ¹ØÓÚwhereÓï¾äµÄλÖÃ

ÀýÈ磺select a.* from (select id,code from b left join c on b.id=c.id)a where id=1
ÕâÀïµÄwhere ÔÚÖ´ÐеÄʱºò£¬ where »áÓÅ»¯ÊÇ·ñ½øÈ뵽СÀ¨ºÅÀïÃæÖ´ÐÐ?????
SQL code:
select id,code from b left join c on b.id=c.id
where id=1


ÒýÓÃ
SQL codeselect id,codefrom bleftjoin con b.id=c.idwhere id=1

ÔÎÄãµÄÓï¾äÖÐ idºÍcodeÒªÖ¸¶¨ÊÇÄĸö±íµÄ¡£È磺b.id c.code:
select id,code from b left join c on b.id=c.id where id=1


È磺
select b.id,c.code from b left join c on b.id=c.id
where b.id=1


SQL code:
select B.id,B.code from b left join c on b.id=c.id AND B.id=1
SQL code:
select B.id,B.code from b left join c on b.id=c.id WHERE B.id=1


SQL code:
ÓÖÉæ¼°µ½whereºÍandµÄÎÊÌâ



Ïà¹ØÎÊ´ð£º

vc²Ù×÷mssqlһСÎÊÌâ

ÏÖÔÚÁ¬µÄÒ»Ô¶³Ìmssql£¬Ã¿´Î²éѯ±È½ÏÂý£¬ÏÖÔÚÏëһϰÑËùÓмǼ²éѯ³öÀ´ÓÃÊý¾Ý¼¯±£´æÆðÀ´£¬È»ºóÕë¶ÔÊý¾Ý¼¯Ôٴβéѯɸѡ¡£
ÏÖÔÚÎÊÏÂÄǸöÊý¾Ý¼¯ÈçºÎ±£´æ²éѯ¼Ç¼£¬¶øÔٴβéѯ£¬¶àлÁË¡£
¿ÉÒÔ°ÑÊý¾Ý¼¯ÖеÄÊý¾Ý·Åµ½ÄÚ´ ......

mssqlºÃ¶à±í¶¼"Ö»¶Á"

×î½üÏÂÃæ·´Ó¦Ëµ³ÌÐòÒì³£
È»ºó´ò¿ªÊý¾Ý¿âÒ»¿´
·¢Ïֺܶà±í¶¼"Ö»¶Á"״̬??
ÓÃsaµÇ½ҲÊÇ...
ºÜÆæ¹Ö°¡..
´óÅ£ÖªµÀÊÇʲôԭÒòÂð?
Ô¸Òâ³ö¸ß·ÖÇó
Ë­½â¾öÁË
¸ø200·Ö!!
Êý¾Ý¿â³öÎÊÌâÁË?

ÒýÓÃ
×î½üÏÂÃæ ......

150·ÖÇóvbscriptÖÐÅжÏmssqlÓï·¨´íÎó

ÔÚvbscriptÖв»ÓÃon error resume nextÈçºÎÅжÏmssqlÓï·¨´íÎó£¡
TRY CATCH?


»òÕßʹÓÃÁ÷³Ì¿ØÖÆÓï¾ä
if 
else


²»ÓÃon error ÓÃÄǸöÎҾͲ»ÐèÒªÔÚÕâÀïѰÕÒ´ð°¸

ÒýÓÃ
²»ÓÃon error ÓÃÄǸöÎҾͲ»Ðè ......

¹ØÓÚMSSQLĬÈÏÖµµÄÎÊÌâ

ÎÒÔÚMSSQL¹ÜÀíÆ÷Àï°Ñн¨×Ö¶Îstr

ÔÚĬÈÏÖµ»ò°ó¶¨ÄÇÀïÎÒÌîдÁË0

È»ºóÎÒ·¢ÏÖ¡£Èç¹ûÎÒÔÚÔö¼Ó¼Ç¼ʱ¡£Õâ¸öSTR²¢²»ÊÇĬÈϵÄ0¶øÊÇNULLÔõô»ØÊ£¿£¨ÔÚÔö¼Ó×Ö¶Îʱ¡£ÎÒûÓмÈërs("str")µÄÖµ¡£Ô­±¾Ò ......

mssql ´¥·¢Æ÷

ÎÒÕýÔÚ×öÒ»¸öÅÅÐаñ±í(T_hist)
±íÄÚÓÐ qid(Íâ¼ü) ÈÕÅÅÐаñ(dhits) ÖÜÅÅÐаñ(whits)  ÔÂÅÅÐаñ(mhits)  ×ÜÅÅÐаñ(hits)  ¶¼ÊÇintÀàÐÍ
ÎÒÏÖÔÚÏë×ö¸ö´¥·¢Æ÷  ÿÈÕÁãµã°ÑËùÓÐÐеÄdhits×Ö¶ÎÇå ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ