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

Orcale SQLÓÅ»¯

1.ORACLE²ÉÓÃ×Ô϶øÉϵÄ˳Ðò½âÎöWHERE×Ó¾ä,¸ù¾ÝÕâ¸öÔ­Àí,±íÖ®¼äµÄÁ¬½Ó±ØÐëдÔÚÆäËûWHEREÌõ¼þ֮ǰ, ÄÇЩ¿ÉÒÔ¹ýÂ˵ô×î´óÊýÁ¿¼Ç¼µÄÌõ¼þ±ØÐëдÔÚWHERE×Ó¾äµÄĩβ. 
(µÍЧ) 
SELECT … from EMP E WHERE SAL > 50000 AND JOB = ‘MANAGER’ AND 25 < (SELECT COUNT(*) from EMP WHERE MGR=E.EMPNO); 
(¸ßЧ) 
SELECT … from EMP E WHERE 25 < (SELECT COUNT(*) from EMP WHERE MGR=E.EMPNO) AND SAL > 50000 AND JOB = ‘MANAGER’; 
2.SELECT×Ó¾äÖбÜÃâʹÓà '*’,(select * from **_table,¾¡Á¿Ð´³öÐèÒªµÄÁÐÃû) .
3.ʹÓñíµÄ±ðÃû(Alias)  ±ÜÃâorcale½âÎöÁÐÃû¹éÊô±í.
--------------------------------------------------------------------------------
²¹³ä(at 2010-01-20 16:08:04):
µ±SQLÖÐÐèÒªUNOINʱ
union Óë union all
UNION Ö¸ÁîµÄÄ¿µÄÊǽ«Á½¸ö SQL Óï¾äµÄ½á¹ûºÏ²¢ÆðÀ´,¿ÉÒԲ鿴ÄãÒªµÄ²éѯ½á¹û
´ÓЧÂÊÉÏ˵£¬UNION ALL Òª±ÈUNION¿ìºÜ¶à£¬ËùÒÔ£¬Èç¹û¿ÉÒÔÈ·ÈϺϲ¢µÄÁ½¸ö½á¹û¼¯Öв»°üº¬Öظ´µÄÊý¾ÝµÄ»°£¬ÄÇô¾ÍʹÓÃUNION ALL£¬ÈçÏ£º 
¾¡Á¿Ê¹ÓÃunion all£¬ÒòΪunionÐèÒª½øÐÐÅÅÐò£¬È¥³ýÖظ´¼Ç¼£¬Ð§Âʵ͡£


Ïà¹ØÎĵµ£º

º½¿Õ¹«Ë¾¹ÜÀíϵͳ(VC++ ÓëSQL 2005)

ϵͳ»·¾³£ºWindows 7
Èí¼þ»·¾³£ºVisual C++ 2008 SP1 +SQL Server 2005
±¾´ÎÄ¿µÄ£º±àдһ¸öº½¿Õ¹ÜÀíϵͳ
      ÕâÊÇÊý¾Ý¿â¿Î³ÌÉè¼ÆµÄ³É¹û£¬ËäÈ»³É¼¨²»¼Ñ£¬µ«ÊÇ×÷ΪÎÒÓÃVC++ ÒÔÀ´±àдµÄ×î´ó³ÌÐò»¹ÊÇ´«µ½ÍøÉÏ£¬ÒÔ¹©²Î¿¼¡£ÓÃVC++ ×öÊý¾Ý¿âÉè¼Æ²¢²»ÈÝÒ×£¬µ«Ò²²»ÊDz»¿ÉÄÜ¡£ÒÔÏÂÊÇÎҵijÌÐò½çÃ棬ºóÃæ ......

SQL ServerË÷ÒýÔ­Ôò

¾ßÌå³ö´¦²»Ïê¡£
ÈçºÎÈÃÄãµÄSQLÔËÐеøü¿ì
---- ÈËÃÇÔÚʹÓÃSQLʱÍùÍù»áÏÝÈëÒ»¸öÎóÇø£¬¼´Ì«¹Ø×¢ÓÚËùµÃµÄ½á¹ûÊÇ·ñÕýÈ·£¬¶øºöÂÔÁ˲»Í¬µÄʵÏÖ·½·¨Ö®¼ä¿ÉÄÜ´æÔÚµÄÐÔÄܲîÒ죬ÕâÖÖÐÔÄܲîÒìÔÚ´óÐ͵ĻòÊǸ´ÔÓµÄÊý¾Ý¿â»·¾³ÖУ¨ÈçÁª»úÊÂÎñ´¦ÀíOLTP»ò¾ö²ßÖ§³ÖϵͳDSS£©ÖбíÏÖµÃÓÈΪÃ÷ÏÔ¡£±ÊÕßÔÚ¹¤×÷ʵ¼ùÖз¢ÏÖ£¬²»Á¼µÄSQLÍùÍùÀ´×ÔÓÚ² ......

×î´ó³Ì¶È½µµÍ SQL Server ÖеÄ×èÈû

http://technet.microsoft.com/zh-cn/magazine/2008.04.blocking.aspx
SQL Server
×î´ó³Ì¶È½µµÍ SQL Server ÖеÄ×èÈû
Cherié Warren
 
¸ÅÀÀ:
·¢ÉúËøÉý¼¶µÄÔ­Òò
±ÜÃâ²»±ØÒªµÄ×èÈû
ÓÅ»¯²éѯ
¼àÊÓËø¶¨¶ÔÐÔÄܵÄÓ°Ïì
Ëø¶¨¶ÔÖ§³ÖÊý¾Ý¿âµÄ²¢·¢¶Áд»î¶¯¶øÑÔÊDZØÐèµÄ£¬µ«×èÈûÈ´»á¶ÔϵͳÐÔÄܲúÉú¸ºÃæÓ°Ï죬 ......

sqlÓÅ»¯50Ìõ

ËäÈ»²éѯËÙ¶ÈÂýµÄÔ­ÒòºÜ¶à£¬µ«ÊÇÈç¹ûͨ¹ýÒ»¶¨µÄÓÅ»¯£¬Ò²¿ÉÒÔʹ²éѯÎÊÌâµÃµ½Ò»¶¨³Ì¶ÈµÄ½â¾ö¡£ ²éѯËÙ¶ÈÂýµÄÔ­ÒòºÜ¶à£¬³£¼ûÈçϼ¸ÖÖ£º
     1¡¢Ã»ÓÐË÷Òý»òÕßûÓÐÓõ½Ë÷Òý(ÕâÊDzéѯÂý×î³£¼ûµÄÎÊÌ⣬ÊdzÌÐòÉè¼ÆµÄȱÏÝ)
     2¡¢i/oÍÌÍÂÁ¿Ð¡£¬ÐγÉÁËÆ¿¾±Ð§Ó¦¡£
   &n ......

sqlÖÐdatediffºÍdateaddµÄÓ÷¨

ͨ³££¬ÄãÐèÒª»ñµÃµ±Ç°ÈÕÆںͼÆËãһЩÆäËûµÄÈÕÆÚ£¬ÀýÈ磬ÄãµÄ³ÌÐò¿ÉÄÜÐèÒªÅжÏÒ»¸öÔµĵÚÒ»Ìì»òÕß×îºóÒ»Ìì¡£ÄãÃǴ󲿷ÖÈË´ó¸Å¶¼ÖªµÀÔõÑù°ÑÈÕÆÚ½øÐзָÄê¡¢Ô¡¢Èյȣ©£¬È»ºó½ö½öÓ÷ָî³öÀ´µÄÄê¡¢Ô¡¢ÈյȷÅÔÚ¼¸¸öº¯ÊýÖмÆËã³ö×Ô¼ºËùÐèÒªµÄÈÕÆÚ£¡
¡¡¡¡ÔÚÕâƪÎÄÕÂÀÎÒ½«¸æËßÄãÈçºÎʹÓÃDATEADDºÍDATEDIFFº¯ÊýÀ´¼ÆËã³öÔÚÄã ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ