SQL SERVERÊý¾ÝÀàÐÍÓëC#Êý¾ÝÀàÐͶÔÕÕ±í
bigint ´Ó -2^63 (-9223372036854775808) µ½ 2^63-1 (9223372036854775807) µÄÕûÐÍÊý¾Ý£¨ËùÓÐÊý×Ö£©¡£´æ´¢´óСΪ 8 ¸ö×Ö½Ú¡£ Int64
int ´Ó -2^31 (-2,147,483,648) µ½ 2^31 - 1 (2,147,483,647) µÄÕûÐÍÊý¾Ý£¨ËùÓÐÊý×Ö£©¡£´æ´¢´óСΪ 4 ¸ö×Ö½Ú¡£int µÄ SQL-92 ͬÒå×ÖΪ integer¡£ Int32
smallint ´Ó -2^15 (-32,768) µ½ 2^15 - 1 (32,767) µÄÕûÐÍÊý¾Ý¡£´æ´¢´óСΪ 2 ¸ö×Ö½Ú¡£Int16
tinyint ´Ó 0 µ½ 255 µÄÕûÐÍÊý¾Ý¡£´æ´¢´óСΪ 1 ×Ö½Ú¡£System.Byte
bit 1 »ò 0 µÄÕûÊýÊý¾Ý¡£Boolean
decimal ´Ó -10^38 +1 µ½ 10^38 –1 µÄ¹Ì¶¨¾«¶ÈºÍСÊýλµÄÊý×ÖÊý¾Ý¡£ System.Decimal
numeric ¹¦ÄÜÉϵÈͬÓÚ decimal¡£ System.Decimal
money »õ±ÒÊý¾ÝÖµ½éÓÚ -2^63 (-922,337,203,685,477.5808) Óë 2^63 - 1 (+922,337,203,685,477.5807) Ö®¼ä£¬¾«È·µ½»õ±Òµ¥Î»µÄǧ·Ö֮ʮ¡£System.Decimal
smallmoney »õ±ÒÊý¾ÝÖµ½éÓÚ -214,748.3648 Óë +214,748.3647 Ö®¼ä£¬¾«È·µ½»õ±Òµ¥Î»µÄǧ·Ö֮ʮ¡£System.Decimal
[½üËÆÊý×Ö]
float ´Ó -1.79E + 308 µ½ 1.79E + 308 µÄ¸¡µã¾«¶ÈÊý×Ö¡£System.Double
real ´Ó -3.40E + 38 µ½ 3.40E + 38 µÄ¸¡µã¾«¶ÈÊý×Ö¡£ System.Single
datetime ´Ó 1753 Äê 1 Ô 1 ÈÕµ½ 9999 Äê 12 Ô 31 ÈÕµÄÈÕÆÚºÍʱ¼äÊý¾Ý£¬¾«È·µ½°Ù·ÖÖ®ÈýÃ루»ò 3.33 ºÁÃ룩¡£ System.DateTime
smalldatetime ´Ó 1900 Äê 1 Ô 1 ÈÕµ½ 2079 Äê 6 Ô 6 ÈÕµÄÈÕÆÚºÍʱ¼äÊý¾Ý£¬¾«È·µ½·ÖÖÓ¡£System.DateTime
[×Ö·û´®]
char ¹Ì¶¨³¤¶ÈµÄ·Ç Unicode ×Ö·ûÊý¾Ý£¬×î´ó³¤¶ÈΪ 8,000 ¸ö×Ö·û¡£String
varchar ¿É±ä³¤¶ÈµÄ·Ç Unicode Êý¾Ý£¬×Ϊ 8,000 ¸ö×Ö·û¡£String
text ¿É±ä³¤¶ÈµÄ·Ç Unicode Êý¾Ý£¬×î´ó³¤¶ÈΪ 2^31 - 1 (2,147,483,647) ¸ö×Ö·û¡£String
varchar ¿É±ä³¤¶ÈµÄ·Ç Unicode Êý¾Ý£¬ÔÚ SQL2005+ ÒÔºóÓÃÀ´È¡´útext¡£String
Unicode ×Ö·û´® nchar ¹Ì¶¨³¤¶ÈµÄ Unicode Êý¾Ý£¬×î´ó³¤¶ÈΪ 4,000 ¸ö×Ö·û¡£String
nvarchar ¿É±ä³¤¶È Unicode Êý¾Ý£¬Æä×î´ó³¤¶ÈΪ 4,000 ×Ö·û¡£sysname ÊÇϵͳÌṩÓû§¶¨ÒåµÄÊý¾ÝÀàÐÍ£¬ÔÚ¹¦ÄÜÉϵÈͬÓÚ nvarchar(128)£¬ÓÃÓÚÒýÓÃÊý¾Ý¿â¶ÔÏóÃû¡£String
ntext ¿É±ä³¤¶È Unicode Êý¾Ý£¬Æä×î´ó³¤¶ÈΪ 2^30 - 1 (1,073,741,823) ¸ö×Ö·û¡£String
nvarchar(max) ¿É±ä³¤¶È Unicode Êý¾Ý, ÔÚ SQL 2005+ ÒÔºóÓÃÀ´È¡´úntext¡£String
[¶þ½øÖÆ×Ö·û´®]
binary ¹Ì¶¨³¤¶ÈµÄ¶þ½øÖÆÊý¾Ý£¬Æä×î´ó³¤¶ÈΪ 8,000 ¸ö×Ö½Ú¡£ System.Byte[]
Ïà¹ØÎĵµ£º
˵µ½ÊÂÎñ£¬Ê×ÏÈÎÒÃǾÍÒªÖªµÀΪʲôÐèÒªÊÂÎñ£¬Õâ¾ÍÒªÏÈ¿´¿´Ëø»úÖƵÄÏà¹Ø¸ÅÄ
ËøµÄ¸ÅÊö
Ò». ΪʲôҪÒýÈëËø
¶à¸öÓû§Í¬Ê±¶ÔÊý¾Ý¿âµÄ²¢·¢²Ù×÷ʱ»á´øÀ´ÒÔÏÂÊý¾Ý²»Ò»ÖµÄÎÊÌâ:
¶ªÊ§¸üÐÂ
A,BÁ½¸öÓû§¶ÁͬһÊý¾Ý²¢½øÐÐÐÞ¸Ä,ÆäÖÐÒ»¸öÓû§µÄÐ޸Ľá¹ûÆÆ»µÁËÁíÒ»¸öÐ޸ĵĽá¹û,±ÈÈ綩Ʊϵͳ&nb ......
ºó׺ÃûΪ.mdfµÄsqlÊý¾Ý¿âÈçºÎ´ò¿ª£¿
ÓÐ.mdfºÍ.ldfÁ½¸öÎļþ£¬´ò¿ª·½°¸£º
·½·¨Ò»£ºÔÚSql serverÆóÒµ¹ÜÀíÆ÷ÖÐ - Êý¾Ý¿â - ÓÒ¼ü <¸½¼ÓÊý¾Ý¿â
·½·¨¶þ£ºÔÚVS2005ÖÐÏȽ¨Á¢Ò»¸öÓëÄãÒª´ò¿ªµÄmdfÎļþͬÃûµÄÊý¾Ý¿â£¬¼Çס´æ´¢Î»Öã¬È»ºóÓÃÄãÒª´ò¿ªµÄmdfÎļþ½«¸Õ½¨Á¢µÄmdfÊý¾Ý¿âÎļþÌæ»»¼´¿É¡£ ......
˼·:SQLÀᄀ¿ÉÄܵIJÉÓÃÁ½¸öÒýºÅ±ÕºÏ±äÁ¿;¶Ô±äÁ¿ÖеÄÒýºÅתÒå;¶Ô²»ÄܲÉÓÃ2¸öÒýºÅ±ÕºÏµÄ±äÁ¿,ÏÈÔ¤ÏÈÅжϱäÁ¿ÀàÐÍ;
·½°¸:
1 ËùÓзÇÊýÖµÔËËã(Èç×Ö·û,¼òµ¥ÊýÖµÐ͵ȵÈ)µÄSQL±äÁ¿¶¼¼ÓÒýºÅ;
2 ËùÓзÇÊýÖµÔËËãµÄSQL±äÁ¿µÄÖµ¶¼²ÉÓÃmagic_quotes_gpc» ......
ËäÈ»ÕâÊÇÎÒÕÒµ½×îÏêϸµÄÅäÖÃÃèÊö£¬µ«Êdz¢ÊÔ»¹ÊÇûÓгɹ¦¡£
1.ÏÂÔØOracle Client Package
.
´Ó
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/winsoft.html
ÏÂÔØ
Instant
Client Package – Basic
°ü
(
±ê×¢
:All files
required to run OCI, OCCI, and JDBC-OC ......