©
Dieses Dokument verwendet PHP-Handbuch für chinesische Websites Freigeben
各种数据库数据类型的比较
ANSI |
DB2 |
Oracle |
SQL Server |
SyBase |
Informix |
MySQL |
BYTE |
||||||
BYTE |
|
|||||
NUMBER Datatype |
||||||
bit |
||||||
NUMBER |
||||||
NUMBER(n) |
||||||
INTEGER,INT, SMALLINT |
Int, smallint, tinyint |
INTEGER,INT |
||||
SERIAL |
||||||
NUMERIC(p,s), DECIMAL(p,s), DEC(p,s) |
DECIMAL(p,s) |
NUMBER(p,s) |
Decimal, numeric |
DECIMAL,DEC, NUMERIC(p,s) |
||
money, smallmoney |
MONEY(p,s) |
|||||
FLOAT(p) |
FLOAT(p) |
FLOAT(p) |
float |
FLOAT(p) |
||
REAL |
FLOAT(63) |
real |
REAL, SMALLFLOAT |
|||
DOUBLE PRECISION |
FLOAT(126) |
|
DOUBLE PRECISION |
|||
Character Datatypes |
||||||
CHARACTER (n) |
CHARACTER (n) |
CHAR(n) |
Char(n) |
|
CHAR(n),CHARACTER(N) |
|
CHARACTER VARYING(n), |
VARCHAR(n) |
VARCHAR2(n), VARCHAR(n) |
Varchar(n) |
CHARACTER VARYING(n) |
||
NCHAR(n) |
nchar(n), nvarchar(n) |
NCHAR(n), NVARCHAR(m,r), VARCHAR(m,r) |
||||
CLOB,NCLOB |
text |
|||||
BLOB |
Image, binary, varbinary |
|||||
|
LONG VARCHAR |
LONG |
|
|||
DATE Datatype |
||||||
DATE |
DATE |
DATE |
|
DATE |
||
Datetime, smalldatetime |
DATETIME |
|||||
|
INTERVAL |
|||||
LOB Datatypes |
||||||
BLOB |
TEXT |
|||||
CLOB,NCLOB |
||||||
BFILE |
||||||
|
||||||
RAW,LONG RAW |
||||||
ROWID,ROWIDs |
||||||
MLSLABEL |