您的位置:首页 > 数据库

SQL 类型和C#类型对照

2016-04-11 10:22 405 查看

SQL类型

C#类型
bitbool
tinyintbyte
smallintshort
intint
bigintlong
realfloat
floatdouble
moneydecimal
datetimeDateTime
charstring
varcharstring
ncharstring
nvarcharstring
textstring
ntextstring
imagebyte[]
binarybyte[]
uniqueidentifier

Guid


http://www.php100.com/manual/PostgreSQL8/datatype.html
Postgresql  NpgsqlDbType System.DbType Enum .Net System Type----------  ------------ ------------------ ----------------int8        Bigint       Int64              Int64bool        Boolean      Boolean            Booleanbytea       Bytea        Binary             Byte[]date        Date         Date               DateTimefloat8      Double       Double             Doubleint4        Integer      Int32              Int32money       Money        Decimal            Decimalnumeric     Numeric      Decimal            Decimalfloat4      Real         Single             Singleint2        Smallint     Int16              Int16text        Text         String             Stringtime        Time         Time               DateTimetimetz      Time         Time               DateTimetimestamp   Timestamp    DateTime           DateTimetimestamptz TimestampTZ  DateTime           DateTimeinterval    Interval     Object             TimeSpanvarchar     Varchar      String             Stringinet        Inet         Object             IPAddressbit         Bit          Boolean            Booleanuuid        Uuid         Guid               Guidarray       Array        Object             Array

Postgre Type --->C# Type
bigint --->Int64
bigserial --->
bit [ (n) ] --->Byte[]
bit varying [ (n) ] --->Byte
boolean --->Boolean
box --->
bytea --->Byte[]
character varying [ (n) ] ---> String
character --->String
cidr
circle 
date --->DateTime
double precision --->Double
inet
integer --->Int32
interval [ (p) ] --->TimeSpan
line 
lseg 
macaddr
money
numeric [ (p, s) ] --->Decimal
decimal [ (p, s) ] --->Decimal
path  
point 
polygon 
real --->Single
smallint --->Int16
serial 
text --->String
time [ (p) ] [ without time zone ] --->
time [ (p) ] with time zone --->
timestamp [ (p) ] [ without time zone ] --->
timestamp [ (p) ] with time zone --->
tsquery 
tsvector 
txid_snapshot
uuid --->Guid
xml    阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: