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

sqlÓï¾ä

 1. ˵Ã÷£º¸´ÖƱí(Ö»¸´Öƽṹ£¬Ô´±íÃû£ºa£¬Ð±íÃû£ºb)
SQL: select * into b from a where 1<>1;
        2. ˵Ã÷£º¿½±´±í(¿½±´Êý¾Ý£¬Ô´±íÃû£ºa£¬Ä¿±ê±íÃû£ºb)
SQL: insert into b(a, b, c) select d, e, f from b;
        3. ˵Ã÷£ºÏÔʾÎÄÕ¡¢Ìá½»È˺Í×îºó»Ø¸´Ê±¼ä
SQL: select a.title, a.username, b.adddate
     from table a,(
          select max(adddate) adddate
          from table where table.title=a.title) b ¡¡
        4. ˵Ã÷£ºÍâÁ¬½Ó²éѯ(±íÃû1£ºa£¬±íÃû2£ºb)
SQL: select a.a, a.b, a.c, b.c, b.d, b.f
     from a LEFT OUT JOIN b ON a.a = b.c; ¡¡
        5. ˵Ã÷£ºÈճ̰²ÅÅÌáÇ°Îå·ÖÖÓÌáÐÑ
SQL: select *
     from Èճ̰²ÅÅ
     where datediff(’’minute’’, f¿ªÊ¼Ê±¼ä, getdate())>5 ¡¡¡¡
¡¡¡¡
        6. ˵Ã÷£ºÁ½ÕŹØÁª±í£¬É¾³ýÖ÷±íÖÐÒѾ­ÔÚ¸±±íÖÐûÓеÄÐÅÏ¢
SQL: delete from info
     where not exists(
           select *
           from infobz
           where info.infid=infobz.infid );
        7. ˵Ã÷£º——
SQL: SELECT A.NUM, A.NAME, B.UPD_DATE, B.PREV_UPD_DATE
     from TABLE1,(SELECT X.NUM, X.UPD_DATE, Y.UPD_DATE PREV_UPD_DATE
                  from (SELECT NUM, UPD_DATE, INBOUND_QTY, STOCK_ONHAND
                        from TABLE2
 &nb


Ïà¹ØÎĵµ£º

¶ÔSQL˵²»£¡NoSQLµÄÊý¾Ý¿â¼¼Êõ¸ïÃü

¸ÐлÌ῵µÂÂÞ¼ÓµÄͶµÝ
    ¾ÍÏñµ±Ä겨ʿ¶ÙµÄ°®¹úÕßΪ·´¿¹Ó¢¹úÖØË°µÄÐж¯Ò»Ñù£¬NoSQLµÄÖ§³ÖÕßÃÇ´Ó¸÷µØÓ¿À´£¬·ÖÏíËûÃÇÈçºÎÍÆ·­»ºÂý¶ø°º¹óµÄ¹ØϵÊý¾Ý¿âµÄ±©Õþ£¬ÔõÑùʹÓøüÓÐЧºÍ¸ü±ãÒ˵ķ½·¨À´¹ÜÀíÊý¾Ý£¬ËûÃÇ¿ªÊ¼¶ÔSQL˵²»£¡NoSQL×éÖ¯ÉϸöÔÂÔھɽðɽµÄÐж¯ÈÃÈËÎŵ½ÁËÊý¾Ý¿â¸ïÃüµÄζµÀ£¬ºÃÏñÒ»¸öÏÖ´úITÒµ°æµÄ²¨ ......

²é¿´sql server 2000µÄ°æ±¾µÄÈýÖÖ·½·¨

·½·¨Ò»£º
´ò¿ªÆóÒµ¹ÜÀíÆ÷£­>SQL SERVRE ×飭>(local)window NT ->ÊôÐÔ
²úÆ·:ÓÐpersonalµÄÊǸöÈË°æµÄ£¬ÓÐEnterpriseµÄÊÇÆóÒµ°æµÄ
²úÆ·°æ±¾£º8.00.2039(sp4);8.00.760(sp3)
·½·¨¶þ£º
µÚÒ»²½£ºÔÚ²éѯ·ÖÎöÆ÷
select @@version
print @@version
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 ......

SQL Server ÎÞÕʺŻòÍü¼ÇÃÜÂëµÇ½ÎÊÌâ

Question 1£º
Êý¾Ý¿âµÄÑé֤ģʽΪWindowsÑéÖ¤£¬É¾³ýÁËMS SQL ServerÕʺÅBUILTIN\Administrators,µÇ½²»ÉÏSQL Server¹ÜÀíÆ÷£¿
Answer£º
      1.ÖØÐÂÔËÐÐMS SQL SERVERµÄ°²×°³ÌÐò£¬ÔÚ“°²×°Ñ¡ÏçÃæÀïÑ¡Ôñ“¸ß¼¶Ñ¡Ï¬ÏÂÒ»²½ºóÑ¡Ôñ“×¢²á±íÖؽ¨”£¬½ÓÏÂÀ´¸ú° ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ