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

SQL ÈÕÆÚת»»

http://xujunprogrammer.blog.hexun.com/8376520_d.html
SQL ServerÖÐÎÄ°æµÄĬÈϵÄÈÕÆÚ×Ö¶Îdatetime¸ñʽÊÇyyyy-mm-dd Thh:mm:ss.mmm
ÀýÈç:
select getdate()
2004-09-12 11:06:08.177
Õâ¶ÔÓÚÔÚÒª²»Í¬Êý¾Ý¿â¼äתÒÆÊý¾Ý»òÕßÏ°¹ßoracleÈÕÆÚ¸ñʽYYYY-MM-DD HH24:MI:SSµÄÈ˶àÉÙÓÐЩ²»·½±ã.
ÎÒÕûÀíÁËÒ»ÏÂSQL ServerÀïÃæ¿ÉÄܾ­³£»áÓõ½µÄÈÕÆÚ¸ñʽת»»·½·¨:
¾ÙÀýÈçÏÂ:
select CONVERT(varchar, getdate(), 120 )
2004-09-12 11:06:08
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 )


Ïà¹ØÎĵµ£º

SQL Server 2005ÖеÄÎļþºÍÎļþ×é

--> Title  : SQL Server 2005ÖеÄÎļþºÍÎļþ×é
--> Author : wufeng4552
--> Date   : 2009-10-23
1¡¢ÎļþºÍÎļþ×éµÄº¬ÒåÓë¹Øϵ
    ÿ¸öÊý¾Ý¿âÓÐÒ»¸öÖ÷Êý¾ÝÎļþ.ºÍÈô¸É¸ö´ÓÎļþ¡£ÎļþÊÇÊý¾Ý¿âµÄÎïÀíÌåÏÖ¡£ Îļþ×é¿ÉÒÔ°üÀ¨·Ö²¼ÔÚ¶à¸öÂß¼­·ÖÇøµÄÎļþ£¬ÊµÏÖ¸ºÔØƽºâ¡£Îļþ×éÔÊÐ ......

ÀàËÆSQL µÄGroup by¹¦ÄÜ

×î½ü×öÁ˼¸¸öССͳ¼ÆµÄ±¨±í½çÃ棬ÓÉÓÚ.net²»´øgroup by µÄ¹¦ÄÜ£¬Í³¼ÆÆðÀ´ÓÐʱºòÏ൱²»±ã£¬±ã³Ã×Å˯×ŵÄʱºòдÁËÒ»¸öÀàËƵķ½·¨¡£
Óв»×ãÖ®´¦»òÊÇÓиüºÃµÄ·½·¨»¹Íû´ó¼ÒÖ¸Õý¡£
ÖÁÓÚЧÂÊÈçºÎ£¿Î´Öª£¬ÒòΪ±¾È˵IJâÊÔÊý¾Ý¾ÍÊDZȽÏÉÙ¡£
/// <summary>
/// SQL Group by
/// </summary>
/// &l ......

ÔÚmysqlÖÐÖ´ÐÐsqlÎļþ£¨Èçtest.sql£©µÄ³£Ó÷½·¨

ÔÚmysqlÖÐÖ´ÐÐsqlÎļþ£¨Èçtest.sql£©µÄ³£Ó÷½·¨
    ÎªÁË·½±ã£¬¿ÉÒÔ½«mysqlµÄ°²×°Â·¾¶ÏÂbinĿ¼µÄµØÖ··Åµ½»·¾³±äÁ¿PATHÖУ¬Èç;C:\Program Files\MySQL\MySQL Server 5.0\bin¡£ÕâÑùÔÚÈÎÒâλÖôò¿ªµÄÃüÁîÐгÌÐò¶¼ÄÜÕÒµ½mysql.exe¡£
    ¿ÉÒÔ´ò¿ªmysqlÃüÁîÐУ¬Ò²¿ÉÒÔÔÚÃüÁîÐÐÖÐͨ¹ýmysql -u r ......

SQL PLUS ÃüÁî´óÈ«(ת)

OracleµÄsql*plusÊÇÓëoracle½øÐн»»¥µÄ¿Í»§¶Ë¹¤¾ß¡£ÔÚsql*plusÖУ¬¿ÉÒÔÔËÐÐsql*plusÃüÁîÓësql*plusÓï¾ä¡£
   ÎÒÃÇͨ³£Ëù˵µÄDML¡¢DDL¡¢DCLÓï¾ä¶¼ÊÇsql*plusÓï¾ä£¬ËüÃÇÖ´ÐÐÍêºó£¬¶¼¿ÉÒÔ±£´æÔÚÒ»¸ö±»³ÆΪsql bufferµÄÄÚ´æÇøÓòÖУ¬²¢ÇÒÖ»Äܱ£´æÒ»Ìõ×î½üÖ´ÐеÄsqlÓï¾ä£¬ÎÒÃÇ¿ÉÒÔ¶Ô±£´æÔÚsql bufferÖеÄsql Óï¾ä½øÐÐ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ