美文网首页
非常全的Oracle to MySQL 表数据类型映射关系表

非常全的Oracle to MySQL 表数据类型映射关系表

作者: 承诺一时的华丽 | 来源:发表于2019-12-03 16:43 被阅读0次
    转换数据类型:
    Oracle 备注 MySQL
    1 BFILE Pointer to binary file, ⇐ 4G VARCHAR(255)
    2 BINARY_FLOAT 32-bit floating-point number FLOAT
    3 BINARY_DOUBLE 64-bit floating-point number DOUBLE
    4 BLOB Binary large object, ⇐ 4G LONGBLOB
    5 CHAR(n), CHARACTER(n) Fixed-length string, 1 ⇐ n ⇐ 255 CHAR(n), CHARACTER(n)
    6 CHAR(n), CHARACTER(n) Fixed-length string, 256 ⇐ n ⇐ 2000 VARCHAR(n)
    7 CLOB Character large object, ⇐ 4G LONGTEXT
    8 DATE Date and time DATETIME
    9 DECIMAL(p,s), DEC(p,s) Fixed-point number DECIMAL(p,s), DEC(p,s)
    10 DOUBLE PRECISION Floating-point number DOUBLE PRECISION
    11 FLOAT(p) Floating-point number DOUBLE
    12 INTEGER, INT 38 digits integer INT / DECIMAL(38)
    13 INTERVAL YEAR(p) TO MONTH Date interval VARCHAR(30)
    14 INTERVAL DAY(p) TO SECOND(s) Day and time interval VARCHAR(30)
    15 LONG Character data, ⇐ 2G LONGTEXT
    16 LONG RAW Binary data, ⇐ 2G LONGBLOB
    17 NCHAR(n) Fixed-length UTF-8 string, 1 ⇐ n ⇐ 255 NCHAR(n)
    18 NCHAR(n) Fixed-length UTF-8 string, 256 ⇐ n ⇐ 2000 NVARCHAR(n)
    19 NCHAR VARYING(n) Varying-length UTF-8 string, 1 ⇐ n ⇐ 4000 NCHAR VARYING(n)
    20 NCLOB Variable-length Unicode string, ⇐ 4G NVARCHAR(max)
    21 NUMBER(p,0), NUMBER(p) 8-bit integer, 1 <= p < 3 TINYINT (0 to 255)
    21 NUMBER(p,0), NUMBER(p) 16-bit integer, 3 <= p < 5 SMALLINT
    21 NUMBER(p,0), NUMBER(p) 32-bit integer, 5 <= p < 9 INT
    21 NUMBER(p,0), NUMBER(p) 64-bit integer, 9 <= p < 19 BIGINT
    21 NUMBER(p,0), NUMBER(p) Fixed-point number, 19 <= p <= 38 DECIMAL(p)
    22 NUMBER(p,s) Fixed-point number, s > 0 DECIMAL(p,s)
    23 NUMBER, NUMBER(*) Floating-point number DOUBLE
    24 NUMERIC(p,s) Fixed-point number NUMERIC(p,s)
    25 NVARCHAR2(n) Variable-length UTF-8 string, 1 ⇐ n ⇐ 4000 NVARCHAR(n)
    26 RAW(n) Variable-length binary string, 1 ⇐ n ⇐ 255 BINARY(n)
    27 RAW(n) Variable-length binary string, 256 ⇐ n ⇐ 2000 VARBINARY(n)
    28 REAL Floating-point number DOUBLE
    29 ROWID Physical row address CHAR(10)
    30 SMALLINT 38 digits integer DECIMAL(38)
    31 TIMESTAMP(p) Date and time with fraction DATETIME(p)
    32 TIMESTAMP(p) Date and time with fraction and time zone DATETIME(p)
    33 UROWID(n) Logical row addresses, 1 ⇐ n ⇐ 4000 VARCHAR(n)
    34 VARCHAR(n) Variable-length string, 1 ⇐ n ⇐ 4000 VARCHAR(n)
    35 VARCHAR2(n) 可变长度的字符串,1⇐ Ñ ⇐4000 VARCHAR(n)
    36 XMLTYPE XML数据 LONGTEXT
    将视图从Oracle转换为MySQL:
    Oracle MySQL
    1 创建或替换视图名称 创建或替换视图名称

    来源:http://www.sqlines.com/oracle-to-mysql#data-types

    相关文章

      网友评论

          本文标题:非常全的Oracle to MySQL 表数据类型映射关系表

          本文链接:https://www.haomeiwen.com/subject/vjgcgctx.html