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

Sql Get Last Day of Month...

-- Sql Get Last Day of Month...
 SELECT     (CASE   MONTH(GETDATE())
                WHEN 1 THEN 31
                WHEN 2 THEN (CASE YEAR(GETDATE())%4 WHEN 0 THEN 29 ELSE 28 END)
                WHEN 3 THEN 31
                WHEN 4 THEN 30
                WHEN 5 THEN 31
                WHEN 6 THEN 30
                WHEN 7 THEN 31
                WHEN 8 THEN 31
                WHEN 9 THEN 30
                WHEN 10 THEN 31
                WHEN 11 THEN 30
                WHEN 12 THEN 31
        END) AS LastDayOfMonth


Ïà¹ØÎĵµ£º

SQLÓï¾äÖÐDateDiffº¯Êý˵Ã÷

º¯Êý¼ò½é:¡¡¡¡
     ·µ»Ø Variant (Long) µÄÖµ£¬±íʾÁ½¸öÖ¸¶¨ÈÕÆÚ¼äµÄʱ¼ä¼ä¸ôÊýÄ¿¡£
º¯ÊýÓï·¨:
¡¡¡¡DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
DateDiff º¯ÊýÓï·¨ÖÐÓÐÏÂÁÐÃüÃû²ÎÊý£º
¡¡¡¡interval ±ØÒª¡£×Ö·û´®±í´ïʽ£¬±íʾÓÃÀ´¼ÆËãdate1 ºÍ date2 µÄʱ¼ä²îµÄʱ¼ä¼ ......

Oracle SQLÓÅ»¯¼¼ÇÉ

ÎÒ¾õµÃÖ÷ÒªÓ¦¸Ã´Ó5¸ö·½Ãæ½øÐе÷Õû£º
1.È¥µô²»±ØÒªµÄ´óÐͱíµÄÈ«±íɨÃè
2.»º´æСÐͱíµÄÈ«±íɨÃè
3.¼ìÑéÓÅ»¯Ë÷ÒýµÄʹÓÃ
4.¼ìÑéÓÅ»¯µÄÁ¬½Ó¼¼Êõ
5.¾¡¿ÉÄܼõÉÙÖ´Ðмƻ®µÄCost
ÏÖÔÚ¼òµ¥µÄ¾Ù¼¸¸öÀý×Ó
Where×Ó¾äÖÐÓГ!=”½«²»Ê¹ÓÃË÷Òý
select account_name from test where amount != 0  (²»Ê¹ÓÃ) ......

Ãâ·ÑµÄSQL Server¹¤¾ß¿ÉÄÜÈÃÄãµÄÉú»î±äµÃ¸üÇáËÉ

¸üУºÐµĶ«Î÷´Ó×îеĸüн«ÊǺìÉ«µÄ¡£
This list will grow as I find new tools.Õâ·ÝÃûµ¥½«³É³¤ÎªÎÒÕÒµ½ÐµĹ¤¾ß¡£ So if you know of some not on this list do post them in the comments.ËùÒÔ£¬Èç¹ûÄãÖªµÀһЩ²»ÔÚ´ËÃûµ¥ÖеÄÒâ¼ûºó×öËûÃÇ¡£
SQL Server Management Studio Add-in's SQL Server¹ÜÀí¹¤×÷ÊÒÍâ½ÓµÄ
......

sqlÖÐ in ¡¢not in ¡¢exists¡¢not exists Ó÷¨ºÍ²î±ð

exists £¨sql ·µ»Ø½á¹û¼¯ÎªÕ棩
not exists (sql ²»·µ»Ø½á¹û¼¯ÎªÕ棩
ÈçÏ£º
±íA
ID NAME
1    A1
2    A2
3  A3
±íB
ID AID NAME
1    1 B1
2    2 B2
3    2 B3
±íAºÍ±íBÊÇ£±¶Ô¶àµÄ¹Øϵ A.ID => B.AID
......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ