SQL Server 和Oracle 数据类型对应

SqlServer 2k转换为Oracle 10g

列名SqlServer数据类型SqlServer长度Oracle数据类型
column1bigint8NUMBER(19)
column2binary50RAW(50)
column3bit1NUMBER(2)
column4char10CHAR(10)
column5datetime8DATE
column6decimal9NUMBER(18)
column7float8BINARY_DOUBLE
column8image16BLOB
column9int4NUMBER(10)
column10money8NUMBER(19,4)
column11nchar10NCHAR(10)
column12ntext16NCLOB
column13numeric9NUMBER(18)
column14nvarchar50NVARCHAR2(50)
column15real4BINARY_FLOAT
column16smalldatetime4DATE
column17smallint2NUMBER(5)
column18smallmoney4NUMBER(10,4)
column19sql_variantBLOB
column20text16CLOB
column21timestamp8RAW(8)
column22tinyint1NUMBER(3)
column23uniqueidentifier16BLOB
column24varbinary50RAW(50)
column25varchar50VARCHAR2(50)

Oracle 10g 转换为SqlServer 2k

Oracle列名|Oracle数据类型|SqlServer列名|SqlServer数据类型|SqlServer数据长度
—-|——|—–|—-
COLUMN1|BINARY_DOUBLE|COLUMN1|float|8
COLUMN2|BINARY_FLOAT|COLUMN2|real|4
COLUMN3|BLOB|COLUMN3|image|16
COLUMN4|CLOB|COLUMN4|ntext|16
COLUMN5|CHAR(10)|COLUMN5|nchar|10
COLUMN6|DATE|COLUMN6|datetime|8
COLUMN12|NUMBER|COLUMN12|numeric|13
COLUMN13|NVARCHAR2(10)|COLUMN13|nvarchar|10
COLUMN14|RAW(10)|COLUMN14|varbinary|10
COLUMN15|TIMESTAMP(6)|COLUMN15|datetime|8
COLUMN16|TIMESTAMP(6) WITH LOCAL TIME ZONE|COLUMN16|datetime|8
COLUMN17|TIMESTAMP(6) WITH TIME ZONE|COLUMN17|datetime|8
COLUMN18|VARCHAR2(10)|COLUMN18|nvarchar|10
COLUMN7|INTERVAL DAY(2) TO SECOND(6)|COLUMN7|nvarchar|30
COLUMN8|INTERVAL YEAR(2) TO MONTH|COLUMN8|nvarchar|14
COLUMN9|LONG|COLUMN9|ntext|16
COLUMN10|LONG RAW|COLUMN10|image|16
COLUMN11|NCLOB|COLUMN11|ntext|16

    原文作者:桃子flying
    原文地址: https://www.jianshu.com/p/294b9bcea8f6
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞