SQL 类型和C#类型对照
2016-04-11 10:22
405 查看
SQL类型 | C#类型 |
---|---|
bit | bool |
tinyint | byte |
smallint | short |
int | int |
bigint | long |
real | float |
float | double |
money | decimal |
datetime | DateTime |
char | string |
varchar | string |
nchar | string |
nvarchar | string |
text | string |
ntext | string |
image | byte[] |
binary | byte[] |
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 阅读更多
相关文章推荐
- C#操作SQL float类型数据,在C#中用double类型就OK了,C#数据类型和SQL数据类型对照
- SQL、CodeSmith、C#数据类型对照
- C++与C#数据类型对照
- 在C#项目中需要用double类型操作MSSQL float类型数据(附C#数据类型和SQL数据类型对照)
- Sql中的datetime类型的空值和c#中的DateTime的空值的转换方法
- C# 与 C++ 数据类型对照(转)
- [C#]Windows API声明中的数据类型与.NET数据类型之间的对照关系
- C# 与 C++ 数据类型对照
- 数据库中与C#中的数据类型对照
- c++和c#数据类型对照
- C++ ,C#类型对照
- Java类型,Hibernate类型和Sql类型的对照关系
- SQL SERVER数据类型与C#数据类型对照表
- C#中把任意类型的泛型集合转换成SQLXML数据格式的实例
- SQL里的real类型和tinyint类型在C#里分别对应类型
- C# 与 C++ 数据类型对照(转)
- 收藏:Sql类型与.Net(C#)类型对应关系
- Sql类型与.Net(C#)类型对应关系表
- SQL SERVER数据库中与C#中的数据类型对照