Oracle数据库迁移到OpenGauss字段类型和字符集对应关系

举报
jackcao 发表于 2022/09/30 09:32:06 2022/09/30
【摘要】 Oracle数据库迁移到OpenGauss字段类型和字符集对应关系 1       Data type OracleOpenGauss说明NUMBERnumericOracle only has one flexible underlying numeric type, NUMBER.Without precision and scale it is set to the OpenGauss...

Oracle数据库迁移到OpenGauss字段类型和字符集对应关系

 

1       Data type

 

Oracle

OpenGauss

说明

NUMBER

numeric

Oracle only has one flexible underlying numeric type, NUMBER.

Without precision and scale it is set to the OpenGauss type float8 to match all needs

CHAR

char

CHAR types limit of 2000 bytes with defaults to 1 if no length is specified. OpenGauss char type has max length set to 8104 so it should match all needs

NCHAR

char

VARCHAR

varchar

VARCHAR types the limit is 2000 bytes in Oracle 7 and 4000 in Oracle 8. OpenGauss varchar type has max length is et to 8104 so it,should match all needs

NVARCHAR

varchar

VARCHAR2

varchar

NVARCHAR2

varchar

STRING

varchar

DATE

timestamp

The DATE data type is used to store the date and time

information. OpenGauss type timestamp should match all needs.

LONG

text

Type LONG is like VARCHAR2 but with up to 2Gb. OpenGauss type text should match all needs or if you want you could use blob

LONG RAW

bytea

CLOB

text

Types LOB and FILE are like LONG but with up to 4Gb. OpenGauss type text should match all needs or if you want you could use blob (large object)

A large object containing single-byte characters

NCLOB

text

A large object containing national character set data

BLOB

bytea

Binary large object

BFILE

bytea

The full path to the external file is returned if destination type is text.

If the destination type is bytea the content of the external file is returned.

Locator for external large binary file

RAW(16)

uuid

RAW column with a length of 16 or 32 bytes are usually GUID, convert them to uuid

RAW(32)

uuid

RAW

bytea

The RAW type is presented as hexadecimal characters. The

contents are treated as binary data. Limit of 2000 bytes

OpenGauss type text should match all needs or if you want you could use blob (large object)

ROWID

oid

 

UROWID

oid

 

FLOAT

double precision

 

DEC

decimal

 

DECIMAL

decimal

 

DOUBLE PRECISION

double precision

 

INT

integer

 

INTEGER

integer

 

BINARY_INTEGER

integer

 

PLS_INTEGER

integer

 

SMALLINT

smallint

 

REAL

real

 

BINARY_FLOAT

numeric

 

BINARY_DOUBLE

numeric

 

TIMESTAMP

timestamp

 

BOOLEAN

boolean

 

INTERVAL

interval

 

XMLTYPE

xml

 

TIMESTAMP WITH TIME ZONE

timestamp with time zone

 

TIMESTAMP WITH LOCAL TIME ZONE

timestamp with time zone

 

SDO_GEOMETRY

geometry

 

 

2       Character Set

 

Oracle

OpenGauss

说明

AL32UTF8

UTF8

 

JA16EUC

EUC_JP

 

JA16SJIS

EUC_JIS_2004

 

ZHT32EUC

EUC_TW

 

CL8ISO8859P5

ISO_8859_5

 

AR8ISO8859P6

ISO_8859_6

 

EL8ISO8859P7

ISO_8859_7

 

IW8ISO8859P8

ISO_8859_8

 

CL8KOI8R

KOI8R

 

CL8KOI8U

KOI8U

 

WE8ISO8859P1

LATIN1

 

EE8ISO8859P2

LATIN2

 

SE8ISO8859P3

LATIN3

 

NEE8ISO8859P4

LATIN4

 

WE8ISO8859P9

LATIN5

 

NE8ISO8859P10

LATIN6

 

BLT8ISO8859P13

LATIN7

 

CEL8ISO8859P14

LATIN8

 

WE8ISO8859P15

LATIN9

 

RU8PC866

WIN866

 

EE8MSWIN1250

WIN1250

 

CL8MSWIN1251

WIN1251

 

WE8MSWIN1252

WIN1252

 

EL8MSWIN1253

WIN1253

 

TR8MSWIN1254

WIN1254

 

IW8MSWIN1255

WIN1255

 

AR8MSWIN1256

WIN1256

 

BLT8MSWIN1257

WIN1257

 

 

【版权声明】本文为华为云社区用户原创内容,转载时必须标注文章的来源(华为云社区)、文章链接、文章作者等基本信息, 否则作者和本社区有权追究责任。如果您发现本社区中有涉嫌抄袭的内容,欢迎发送邮件进行举报,并提供相关证据,一经查实,本社区将立刻删除涉嫌侵权内容,举报邮箱: cloudbbs@huaweicloud.com
  • 点赞
  • 收藏
  • 关注作者

评论(0

0/1000
抱歉,系统识别当前为高风险访问,暂不支持该操作

全部回复

上滑加载中

设置昵称

在此一键设置昵称,即可参与社区互动!

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。

*长度不超过10个汉字或20个英文字符,设置后3个月内不可修改。