SQL SERVER 2000ÓÃsqlÓï¾äÈçºÎ»ñµÃµ±Ç°ÏµÍ³Ê±¼ä
¾ÍÊÇÓÃGETDATE();
SqlÖеÄgetDate()2008Äê01ÔÂ08ÈÕ ÐÇÆÚ¶þ 14:59
Sql Server ÖÐÒ»¸ö·Ç³£Ç¿´óµÄÈÕÆÚ¸ñʽ»¯º¯Êý
Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2008 10:57AM
Select CONVERT(varchar(100), GETDATE(), 1): 05/16/08
Select CONVERT(varchar(100), GETDATE(), 2): 08.05.16
Select CONVERT(varchar(100), GETDATE(), 3): 16/05/08
Select CONVERT(varchar(100), GETDATE(), 4): 16.05.08
Select CONVERT(varchar(100), GETDATE(), 5): 16-05-08
Select CONVERT(varchar(100), GETDATE(), 6): 16 05 08
Select CONVERT(varchar(100), GETDATE(), 7): 05 16, 08
Select CONVERT(varchar(100), GETDATE(), 8): 10:57:46
Select CONVERT(varchar(100), GETDATE(), 9): 05 16 2008 10:57:46:827AM
Select CONVERT(varchar(100), GETDATE(), 10): 05-16-08
Select CONVERT(varchar(100), GETDATE(), 11): 08/05/16
Select CONVERT(varchar(100), GETDATE(), 12): 080516
Select CONVERT(varchar(100), GETDATE(), 13): 16 05 2008 10:57:46:937
Select CONVERT(varchar(100), GETDATE(), 14): 10:57:46:967
Select CONVERT(varchar(100), GETDATE(), 20): 2008-05-16 10:57:47
Select CONVERT(varchar(100), GETDATE(), 21): 2008-05-16 10:57:47.157
Select CONVERT(varchar(100), GETDATE(), 22): 05/16/08 10:57:47 AM
Select CONVERT(varchar(100), GETDATE(), 23): 2008-05-16
Select CONVERT(varchar(100), GETDATE(), 24): 10:57:47
Select CONVERT(varchar(100), GETDATE(), 25): 2008-05-16 10:57:47.250
Select CONVERT(varchar(100), GETDATE(), 100): 05 16 2008 10:57AM
Select CONVERT(varchar(100), GETDATE(), 101): 05/16/2008
Select CONVERT(varchar(100), GETDATE(), 102): 2008.05.16
Select CONVERT(varchar(100), GETDATE(), 103): 16/05/2008
Select CONVERT(varchar(100), GETDATE(), 104): 16.05.2008
Select CONVERT(varchar(100), GETDATE(), 105): 16-05-2008
Select CONVERT(varchar(100), GETDATE(), 106): 16 05 2008
Select CONVERT(varchar(100), GETDATE(), 107): 05 16, 2008
Select CONVERT(varchar(100), GETDATE(), 108): 10:57:49
Select CONVERT(varchar(100), GETDATE(), 109): 05 16 2008
10:57:49:437AM
´Ó²©¿ÍÔ°Öп´µ½Ò»ÆªÎÄÕ£¬½éÉÜ´óÈí¼þ¹«Ë¾ÃæÊÔʱ³£³£»á³öµÄÁ½µÀSQLÌ⣨¼û¸½Â¼£©¡£
ÎÒ¾õµÃÊÜÒæºÜ¶à£¬ÔÚ´Ë֮ǰ£¬ÎÒÒ»Ö±¾õµÃ£¬SQL2008ËƺõÌṩÁËÕâ·½ÃæµÄÖ§³Ö£¬µ«¸üµÍµÄ°æ±¾£¬°üÀ¨2005£¬·ÇÓαê×ö²»³öÀ´£¨Ë®Æ½¹»²Ë£©¡£×ܽáÐĵÃÈçÏ£º
1¡¢ Ç¿´óµÄgroup by
1 select stdname,
2 isnull( ......
¶ÔÓÚÎÒÃÇÕâЩ½öÓõ½sql¼òµ¥²éѯ¿ª·¢ÈËÔ±À´Ëµ£¬¿ÉÄÜÖ»Á˽âһЩ»ù±¾µÄsqlº¯ÊýºÍ<>=ÕâÑùµÄÌõ¼þÓï¾ä£¬½ñÌìÒ»¸öÅóÓÑÎÊÆð£ºÄ¬ÈϵÄjoinÊÇouter»¹ÊÇinner¡£¡£¡£¡£
ÌصØÊÕ¼¯ÁËһЩ¶«Î÷£¬Ò²Ìù³öÀ´ºÍ´ó¼Ò·ÖÏíÏ£º
joinleft outer join=left join , right outer join=right join, inner jo ......