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

SQLserverÖÐÓÃconvertº¯Êýת»»ÈÕÆÚ¸ñʽ

select getdate()
½á¹û£º2003-12-28 16:52:00.107
select convert(char(8),getdate(),112)
½á¹û£º20031228
select convert(char(8),getdate(),108)
½á¹û£º16:52:00
select convert(char(8),getdate(),112)
                                  |
                            Ö¸ÈÕÆÚ¸ñʽ
¹æÔòÈçÏ£º
1 101 ÃÀ¹ú mm/dd/yyyy
2 102 ANSI yy.mm.dd
3 103 Ó¢¹ú/·¨¹ú dd/mm/yy
4 104 µÂ¹ú dd.mm.yy
5 105 Òâ´óÀû dd-mm-yy
6 106 - dd mon yy
7 107 - mon dd, yy
8 108 - hh:mm:ss
- 9 »ò 109 (*)  ĬÈÏÖµ + ºÁÃë mon dd yyyy hh:mi:ss:mmmAM£¨»ò PM£©
10 110 ÃÀ¹ú mm-dd-yy
11 111 ÈÕ±¾ yy/mm/dd
12 112 ISO yymmdd
- 13 »ò 113 (*)  Å·ÖÞĬÈÏÖµ + ºÁÃë dd mon yyyy hh:mm:ss:mmm(24h)
14 114 - hh:mi:ss:mmm(24h)
- 20 »ò 120 (*)  ODBC ¹æ·¶ yyyy-mm-dd hh:mm:ss[.fff]
- 21 »ò 121 (*)  ODBC ¹æ·¶£¨´øºÁÃ룩 yyyy-mm-dd hh:mm:ss[.fff]
- 126(***) ISO8601 yyyy-mm-dd Thh:mm:ss:mmm£¨²»º¬¿Õ¸ñ£©
- 130* ¿ÆÍþÌØ dd mon yyyy hh:mi:ss:mmmAM
- 131* ¿ÆÍþÌØ dd/mm/yy hh:mi:ss:mmmAM


Ïà¹ØÎĵµ£º

SQLSERVER SQLÐÔÄÜÓÅ»¯

1.Ñ¡Ôñ×îÓÐЧÂʵıíÃû˳Ðò(Ö»ÔÚ»ùÓÚ¹æÔòµÄÓÅ»¯Æ÷ÖÐÓÐЧ)¡¡¡¡
¡¡¡¡ SQLSERVERµÄ½âÎöÆ÷°´ÕÕ´ÓÓÒµ½×óµÄ˳Ðò´¦Àífrom×Ó¾äÖеıíÃû£¬Òò´Ëfrom×Ó¾äÖÐдÔÚ×îºóµÄ±í£¨»ù´¡±ídriving table£©½«±»×îÏÈ´¦Àí£¬ÔÚfrom×Ó¾äÖаüº¬¶à¸ö±íµÄÇé¿öÏ£¬±ØÐëÑ¡Ôñ¼Ç¼ÌõÊý×îÉٵıí×÷Ϊ»ù´¡±í£¬µ±SQLSERVER´¦Àí¶à¸ö±íʱ£¬»áÔËÓÃÅÅÐò¼°ºÏ²¢µÄ·½Ê½Á ......

SqlServer´æ´¢¹ý³Ì·ÖÒ³

--TOP n ʵÏÖµÄͨÓ÷ÖÒ³´æ´¢¹ý³Ì(ת×Ô×Þ½¨)
CREATE PROC sp_PageView
@tbname sysname, --Òª·ÖÒ³ÏÔʾµÄ±íÃû
@FieldKey nvarchar(1000), --ÓÃÓÚ¶¨Î»¼Ç¼µÄÖ÷¼ü(Ωһ¼ü)×Ö¶Î,¿ÉÒÔÊǶººÅ·Ö¸ôµÄ¶à¸ö×Ö¶Î
@PageCurrent int=1, --ÒªÏÔʾµÄÒ³Âë
@PageSize int=10, - ......

pymssql·ÃÎÊsqlserverµÄÒ»¸öbug


¡¡¡¡¶ÔÊý¾Ý¿â½øÐжà±í²Ù×÷£¬Èç¹û±íÓë±íÖ®¼ä´æÔÚÒÀÀµ£¬ÄÇôÏÔʽµÄʹÓÃÊÂÎñ£¬¿ÉÒÔ±£³Ö¶ÔÊý¾Ý¿â²Ù×÷µÄÔ­×ÓÐÔ¡£ÓÃPython·ÃÎÊSqlServerÊý¾Ý¿â£¬ÎÒʹÓÃpymssql¿â¡£½ñÌìÔÚʹÓÃÕâ¸ö¿âµÄʱºò£¬·¢ÏÖÒ»¸öÎÊÌâ¡£
ÎÊÌâ´ó¸ÅÊÇÕâÑùµÄ£º
¡¡¡¡ÎÒÓÐÁ½ÕÅ±í£¬Ò»ÕÅÖ÷±í£¨ClassInfo£©£¬Ò»ÕÅ´Ó±í£¨Student£©£¬Student±íͨ¹ýÍâ¼üClassIDÓëClassI ......

sqlserver µÄprepare·½·¨Ê¹ÓÃÎÊÌâ

1.Èç¹ûÏÈprepare ºóÌí¼Ó²ÎÊý£¬ÕâÑùÒ»²¿·ÖÊý¾ÝÀàÐÍ¿ÉÒÔ²»ÓÃÉèÖÃÆäsize´óС£¬ÀýÈçchar
2.Èç¹ûÏÈÌí¼Ó²ÎÊýÔÙprepare£¬¾Í±ØÐëÉèÖòÎÊýµÄÀàÐÍ£¬´óС£¬¾«¶È²ÅÄÜͨ¹ý£¬±ÈÈçchar,varchar,decimalÀàÐÍ£¬¶øint,floatÓй̶¨×Ö½ÚÀàÐ͵ÄÊý¾ÝÀàÐÍÔò¿É²»ÓÃÉèÖôóС¡£
3.¹ØÓÚSqlServerµÄtimestampÀàÐÍ£º¸ÃÀàÐÍΪSqlServerµÄʱ¼ä´ÁÀàÐÍ£¬´´½ ......

ISA·À»ðǽ¿Í»§¶ËºÍSQLSERVER¿Í»§¶ËµÄÎÊÌâ

ÓÐÍâÀ´³ÌÐò°²×°»ùÓÚ.NET FRAMEWORK 3.5µÄÓ¦ÓóÌÐòÔÚÄÚÍøµÄPCÉÏ£¬ÐèҪͨ¹ýISA·À»ðǽ¿Í»§¶Ë¾­¹ý·þÎñÆ÷ÉϵÄISA2006 SP1·ÃÎÊÍâÍøµÄSQLSERVER2005Êý¾Ý¿â¡£
        °´ÕÕÒÔÍù¾­Ñ飬ÐèÒªÅäÖÃÒ»ÌõSQLSERVER2005·þÎñÆ÷ËùÔÚµÄIPµØÖ·µÄ³öÕ¾¹æÔò£¬²¢ÇÒ²¢²»ÐèÒªÉèÖÃÒ»Ìõ»ùÓÚÓòÃûµÄ¹æÔò¡£
 &nb ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ