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

sql ³£ÓõĴúÂë

£¨1£©
Mcirosoft JET SQL ÖУ¬ÈÕÆÚÓÑ#’¶¨½ç¡£ÈÕÆÚÒ²¿ÉÒÔÓÃDatevalue()º¯ÊýÀ´´úÌæ¡£ÔڱȽÏ×Ö·ûÐ͵ÄÊý¾Ýʱ£¬Òª¼ÓÉϵ¥ÒýºÅ’’£¬Î²¿Õ¸ñÔڱȽÏÖб»ºöÂÔ¡£
Àý£º
WHERE OrderDate>#96-1-1#
Ò²¿ÉÒÔ±íʾΪ£º
WHERE OrderDate>Datevalue(‘1/1/96’)
ʹÓà NOT ±í´ïʽÇó·´¡£
Àý£º²é¿´96Äê1ÔÂ1ÈÕÒÔºóµÄ¶¨µ¥
WHERE Not OrderDate<=#1/1/96#
£¨2£©
 union all ²»È¥Öظ´£¬union È¥Öظ´
ʹÓÃÕâ¸ö¹Ø¼ü×Ó °ÉÁ½¸ö²éѯµÄ½á¹ûºÏ²¢ÆðÀ´£¬


Ïà¹ØÎĵµ£º

SQL exists ºÍin

in ºÍ existsÆäʵͦºÃÇø±ðµÄ.ÇÒ¿´Ï±߻ù±¾¸ÅÄî¡£
in ÊÇÒ»¸ö¼¯ºÏÔËËã·û.
a in {a,c,d,s,d....}
Õâ¸öÔËËãÖÐ,Ç°ÃæÊÇÒ»¸öÔªËØ,ºóÃæÊÇÒ»¸ö¼¯ºÏ,¼¯ºÏÖеÄÔªËØÀàÐÍÊǺÍÇ°ÃæµÄÔªËØÒ»ÑùµÄ¡£ÊµÏֵĶԼ¯ºÏÖеÄÔªËؽøÐбéÀú£¬ÒÔÈ·¶¨¸ø¶¨µÄÔªËØaÊÇ·ñÓë×Ó²éѯ»òÁбíÖеÄÖµÏàÆ¥Åä¡£
in ÔËËãÓÃÔÚsqlÓï¾äÖÐ,ËüºóÃæ´øµÄselect Ò»¶¨ÊÇÑ¡Ò»¸ ......

sql server ifǶÌ×»ù±¾Óï·¨

Àý×Ó£º
if 1<>1
begin
   if  5<0
      begin
            print('ʧ°Ü')
       end
       else begin
     &nbs ......

¼¸Ìõ³£¼ûµÄÊý¾Ý¿â·ÖÒ³ SQL Óï¾ä

SQL Server
¡¡¡¡´ÓÊý¾Ý¿â±íÖеĵÚMÌõ¼Ç¼¿ªÊ¼È¡NÌõ¼Ç¼£¬ÀûÓÃTop¹Ø¼ü×Ö£º×¢ÒâÈç¹ûSelectÓï¾äÖмÈÓÐtop£¬ÓÖÓÐorder by£¬ÔòÊÇ´ÓÅÅÐòºÃµÄ½á¹û¼¯ÖÐÑ¡Ôñ£º
¡¡¡¡SELECT *
¡¡¡¡from ( SELECT Top N *
¡¡¡¡from (SELECT Top (M + N - 1) * from& ......

Config SQL Server for JDBC Access

1. In "MicroSoft SQL Server Management Studio", right click SQL Server instance, select "Properties", select "Security" in left panel and check "SQL Server and Windows Authentication mode" in right Panel.
2. In "SQL  Server Configuration Manager", select "SQL Server Network Configuration > ......

SQLÖ®¾Å Êý¾Ý¿âÉè¼Æ

Íâ¼ü
======================
Íâ¼üÊÇÏà¶ÔÓÚÖ÷¼ü˵µÄ£¬Êǽ¨Á¢±íÖ®¼ä µÄÁªÏµµÄ±ØÐëµÄÇ°Ìá¡£
   ±ÈÈ磺ѧÉú±í ¡¢Ñ§Éú³É¼¨±íÒ»Ò»¶ÔÓ¦ÊÇÒòΪ ËûÃǶ¼¾ßÓÐÏàͬµÄ×ֶΣºÑ§ºÅ£¬°ÑѧÉú±í×÷ΪÖ÷±í£¬Ñ§ºÅÊÇËûµÄÖ÷¼ü£¬Ïà¶ÔÓÚÖ÷±íÀ´Ëµ£¬Ñ§Éú³É¼¨µÄ×ֶΠѧºÅ¾ÍÊÇѧÉú±íµÄÍâ¼ü¡£
  ûÓÐÍâ¼ü£¬Á½¸ö±í¾Íû°ì·¨½¨Á¢ÁªÏµ°¡£¡ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ