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

sqlʱ¼ä±È½Ï²Ù×÷³£Óú¯Êý

--ÈÕÆÚת»»²ÎÊý,ÖµµÃÊÕ²Ø
select CONVERT(varchar, getdate(), 120)
2004-09-12 11:06:08
select convert(varchar(10),getdate() ,120) 
----------
2009-04-09
select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','')
20040912110608
select CONVERT(varchar(12) , getdate(), 111 )
2004/09/12
select CONVERT(varchar(12) , getdate(), 112 )
20040912
select CONVERT(varchar(12) , getdate(), 102 )
2004.09.12
ÆäËüÎÒ²»³£ÓõÄÈÕÆÚ¸ñʽת»»·½·¨:
select CONVERT(varchar(12) , getdate(), 101 )
09/12/2004
select CONVERT(varchar(12) , getdate(), 103 )
12/09/2004
select CONVERT(varchar(12) , getdate(), 104 )
12.09.2004
select CONVERT(varchar(12) , getdate(), 105 )
12-09-2004
select CONVERT(varchar(12) , getdate(), 106 )
12 09 2004
select CONVERT(varchar(12) , getdate(), 107 )
09 12, 2004
select CONVERT(varchar(12) , getdate(), 108 )
11:06:08
select CONVERT(varchar(12) , getdate(), 109 )
09 12 2004 1
select CONVERT(varchar(12) , getdate(), 110 )
09-12-2004
select CONVERT(varchar(12) , getdate(), 113 )
12 09 2004 1
select CONVERT(varchar(12) , getdate(), 114 )
11:06:08.177


Ïà¹ØÎĵµ£º

SQLÅúÁ¿¸ü¸ÄÓû§±íÄÚ×Ö·ûÐÍ×ֶεÄÅÅÐò¹æÔò

--------------------------------------------------------------------------
--  Author : htl258(Tony)
--  Date   : 2010-04-23 20:33:15
--  Version:Microsoft SQL Server 2008 (RTM) - 10.0.1600.22 (Intel X86)
--          Jul  ......

MySQLÖÐÓÃsqlÓï¾ä²åÈëʱÆÚ

mysql> create table testdate(
         -> id int not null auto_increment primary key,
         -> time date);
Query OK, 0 rows affected (0.30 sec)
mysql> insert into testdate(time) values('2010-4-23');
Q ......

ʹÓÃSQLÓï¾äÆô¶¯SQL ServerÍâΧ×é¼þ·þÎñ

-- To allow advanced options to be changed.
EXEC sp_configure 'show advanced options', 1
GO
-- To update the currently configured value for advanced options.
RECONFIGURE
GO
-- To enable the feature.
EXEC sp_configure 'CLR', 0
GO
-- To update the currently configured value for this feature. ......

SQL ServerÖÐδ¹«²¼µÄÀ©Õ¹´æ´¢¹ý³Ì

SQL ServerÖÐδ¹«²¼µÄÀ©Õ¹´æ´¢¹ý³Ì
×÷Õß: echsys, ¡¡³ö´¦:blog,¡¡ÔðÈα༭: ÀîÊéÇÙ,¡¡
2008-09-09 07:00
¡¡¡¡ÔÚSQL ServerÖаüº¬Á˼¸¸ö¿ÉÒÔ·ÃÎÊϵͳע²á±íµÄÀ©Õ¹´æ´¢¹ý³Ì¡£ËüÃÇÌṩÁËÔÚµ±Ç°µÄSQL Server°æ±¾ÖзÃÎÊϵͳע²á±íµÄÄÜÁ¦£¬¶øÇҺܶàÈËÀûÓÃSQL ServerÀ´½øÐй¥»÷ϵͳ¡£±¾ÎĽéÉÜÁËÈçºÎÔÚSQL ServerÖнûÓÃËûÃÇ¡£
......

SQL SERVERÐÔÄÜÓÅ»¯×ÛÊö

SQL SERVERÐÔÄÜÓÅ»¯×ÛÊö
--Ô­Öø:Haiwer
 
½üÆÚÒò¹¤×÷ÐèÒª£¬Ï£Íû±È½ÏÈ«ÃæµÄ×ܽáÏÂSQL SERVERÊý¾Ý¿âÐÔÄÜÓÅ»¯Ïà¹ØµÄ×¢ÒâÊÂÏÔÚÍøÉÏËÑË÷ÁËÒ»ÏÂ,·¢ÏֺܶàÎÄÕÂ,ÓеͼÁгöÁËÉϰÙÌõ,µ«ÊÇ×Ðϸ¿´·¢ÏÖ£¬ÓкܶàËÆÊǶø·Ç»òÕß¹ýʱ(¿ÉÄܶÔSQL SERVER6.5ÒÔǰµÄ°æ±¾»òÕßORACLEÊÇÊÊÓõÄ)µÄÐÅÏ¢£¬Ö»ºÃ×Ô¼º¸ù¾ÝÒÔǰµÄ¾­ÑéºÍ²âÊÔ½á¹û½ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ