Oracle数据库迁移到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 |
|
- 点赞
- 收藏
- 关注作者
评论(0)