1. 程式人生 > >SQL Server 與ORACLE資料型別轉換對應關係

SQL Server 與ORACLE資料型別轉換對應關係

關於SQL ServerOracle資料型別的對應關係可以通過下面的語句進行查詢

SELECT * FROMmsdb.dbo.MSdatatype_mappings wheredbms_name='ORACLE';

型別

SQL Serer

Oracle

精度

是否支援null

ORACLE

bigint

NUMBER

19

3

1

ORACLE

binary

BLOB

NULL

0

1

ORACLE

binary

RAW

-1

4

1

ORACLE

bit

NUMBER

1

3

1

ORACLE

char

CHAR

-1

4

1

ORACLE

char

CLOB

NULL

0

1

ORACLE

char

VARCHAR2

-1

4

1

ORACLE

date

DATE

NULL

0

1

ORACLE

datetime

TIMESTAMP

3

4

1

ORACLE

datetime2

TIMESTAMP

7

4

1

ORACLE

datetimeoffset

TIMESTAMP (7) WITH TIME ZONE

NULL

0

1

ORACLE

decimal

NUMBER

-1

3

1

ORACLE

double precision

FLOAT

NULL

0

1

ORACLE

float

FLOAT

NULL

0

1

ORACLE

geography

BLOB

NULL

0

1

ORACLE

geometry

BLOB

NULL

0

1

ORACLE

hierarchyid

BLOB

NULL

0

1

ORACLE

image

BLOB

NULL

0

1

ORACLE

int

NUMBER

10

3

1

ORACLE

money

NUMBER

19

3

1

ORACLE

nchar

NCHAR

-1

4

1

ORACLE

nchar

NCLOB

NULL

0

1

ORACLE

ntext

NCLOB

NULL

0

1

ORACLE

numeric

NUMBER

-1

3

1

ORACLE

nvarchar

NCLOB

NULL

0

1

ORACLE

nvarchar

NVARCHAR2

-1

4

1

ORACLE

nvarchar(max)

NCLOB

NULL

0

1

ORACLE

real

REAL

NULL

0

1

ORACLE

smalldatetime

DATE

NULL

0

1

ORACLE

smallint

NUMBER

5

3

1

ORACLE

smallmoney

NUMBER

10

3

1

ORACLE

sql_variant

NCLOB

NULL

0

1

ORACLE

sysname

NVARCHAR2

128

4

1

ORACLE

text

CLOB

NULL

0

1

ORACLE

time

VARCHAR2

16

4

1

ORACLE

timestamp

RAW

8

4

1

ORACLE

tinyint

NUMBER

3

3

1

ORACLE

uniqueidentifier

CHAR

38

4

1

ORACLE

varbinary

BLOB

NULL

0

1

ORACLE

varbinary

RAW

-1

4

1

ORACLE

varbinary(max)

BLOB

NULL

0

1

ORACLE

varchar

CLOB

NULL

0

1

ORACLE

varchar

VARCHAR2

-1

4

1

ORACLE

varchar(max)

CLOB

NULL

0

1

ORACLE

xml

NCLOB

NULL

0

1

ORACLE

bigint

NUMBER

19

3

1

ORACLE

binary

BLOB

NULL

0

1

ORACLE

binary

RAW

-1

4

1

ORACLE

bit

NUMBER

1

3

1

ORACLE

char

CHAR

-1

4

1

ORACLE

char

CLOB

NULL

0

1

ORACLE

char

VARCHAR2

-1

4

1

ORACLE

date

DATE

NULL

0

1

ORACLE

datetime

TIMESTAMP

3

4

1

ORACLE

datetime2

TIMESTAMP

7

4

1

ORACLE

datetimeoffset

TIMESTAMP (7) WITH TIME ZONE

NULL

0

1

ORACLE

decimal

NUMBER

-1

3

1

ORACLE

double precision

FLOAT

NULL

0

1

ORACLE

float

FLOAT

NULL

0

1

ORACLE

geography

BLOB

NULL

0

1

ORACLE

geometry

BLOB

NULL

0

1

ORACLE

hierarchyid

BLOB

NULL

0

1

ORACLE

image

BLOB

NULL

0

1

ORACLE

int

NUMBER

10

3

1

ORACLE

money

NUMBER

19

3

1

ORACLE

nchar

NCHAR

-1

4

1

ORACLE

nchar

NCLOB

NULL

0

1

ORACLE

ntext

NCLOB

NULL

0

1

ORACLE

numeric

NUMBER

-1

3

1

ORACLE

nvarchar

NCLOB

NULL

0

1

ORACLE

nvarchar

NVARCHAR2

-1

4

1

ORACLE

nvarchar(max)

NCLOB

NULL

0

1

ORACLE

real

REAL

NULL

0

1

ORACLE

smalldatetime

DATE

NULL

0

1

ORACLE

smallint

NUMBER

5

3

1

ORACLE

smallmoney

NUMBER

10

3

1

ORACLE

sql_variant

NCLOB

NULL

0

1

ORACLE

sysname

NVARCHAR2

128

4

1

ORACLE

text

CLOB

NULL

0

1

ORACLE

time

VARCHAR2

16

4

1

ORACLE

timestamp

RAW

8

4

1

ORACLE

tinyint

NUMBER

3

3

1

ORACLE

uniqueidentifier

CHAR

38

4

1

ORACLE

varbinary

BLOB

NULL

0

1

ORACLE

varbinary

RAW

-1

4

1

ORACLE

varbinary(max)

BLOB

NULL

0

1

ORACLE

varchar

CLOB

NULL

0

1

ORACLE

varchar

VARCHAR2

-1

4

1

ORACLE

varchar(max)

CLOB

NULL

0

1

ORACLE

xml

NCLOB

NULL

0

1

ORACLE

bigint

NUMBER

19

3

1

ORACLE

binary

BLOB

NULL

0

1

ORACLE

binary

RAW

-1

4

1

ORACLE

bit

NUMBER

1

3

1

ORACLE

char

CHAR

-1

4

1

ORACLE

char

CLOB

NULL

0

1

ORACLE

char

VARCHAR2

-1

4

1

ORACLE

date

DATE

NULL

0

1

ORACLE

datetime

VARCHAR2

27

4

1

ORACLE

datetime2

VARCHAR2

27

4

1

ORACLE

datetimeoffset

VARCHAR2

34

4

1

ORACLE

decimal

NUMBER

-1

3

1

ORACLE

double precision

FLOAT

NULL

0

1

ORACLE

float

FLOAT

NULL

0

1

ORACLE

geography

BLOB

NULL

0

1

ORACLE

geometry

BLOB

NULL

0

1

ORACLE

hierarchyid

BLOB

NULL

0

1

ORACLE

image

BLOB

NULL

0

1

ORACLE

int

NUMBER

10

3

1

ORACLE

money

NUMBER

19

3

1

ORACLE

nchar

CHAR

-1

4

1

ORACLE

nchar

CLOB

NULL

0

1

ORACLE

ntext

CLOB

NULL

0

1

ORACLE

numeric

NUMBER

-1

3

1

ORACLE

nvarchar

CLOB

NULL

0

1

ORACLE

nvarchar

VARCHAR2

-1

4

1

ORACLE

nvarchar(max)

CLOB

NULL

0

1

ORACLE