当前位置:网站首页>Compatibility description between kingbasees and Oracle (2. Data type)
Compatibility description between kingbasees and Oracle (2. Data type)
2022-07-28 23:41:00 【Thousands of sails passed by the side of the sunken boat_】
2. data type
2.1. KingbaseES Data type to Oracle Data type conversion
Serial number | KingbaseES data type | Oracle data type | Remarks (KingbaseES) |
|---|---|---|---|
Numerical type | |||
1 | tinyint | NUMBER | Single byte integer -128 to +127 |
2 | smallint | NUMBER | A small range of integers -32768 to +32767 |
3 | integer | NUMBER | A typical choice of integers -2147483648 to +2147483647 |
4 | bigint | NUMBER | Large range integers -9223372036854775808 to +9223372036854775807 |
5 | decimal | NUMBER | user Specify the precision , accurate Before the highest decimal point 131072 position , as well as After the decimal point 16383 position |
6 | numeric, number | NUMBER | user Specify the precision , accurate Before the highest decimal point 131072 position , as well as After the decimal point 16383 position |
7 | real | FLOAT | can Variable precision , Imprecise 6 Decimal precision |
8 | float | FLOAT | |
9 | double precision, double | FLOAT | 8 byte can Variable precision , Imprecise 15 Decimal precision |
10 | smallserial | NUMBER | since Small integer of dynamic increase 1 To 32767 |
11 | serial | NUMBER | Automatically incremented integer 1 To 2147483647 |
12 | bigserial | NUMBER | Single byte integer +1 to +9223372036854775807 |
Character | |||
1 | character (n[char | byte]), char(n[char | byte]) | CHAR/CLOB | Fixed length , Maximum To 8000, Fill in the blank charge . When the length is small On 1000 When you change to CHAR, When the length exceeds 1000 Convert to CLOB |
2 | character varying(n[char | byte]), varchar(n[char | byte]), varchar2(n[char | byte]) | VARCHAR2/CLOB | Limited lengthening , Maximum to 8000. When The length is not greater than 2000 When you change to CHAR, When The length exceeds 2000 Convert to CLOB |
3 | text | CLOB | Infinite length |
Large object types | |||
1 | clob | CLOB | Character large object |
2 | bytea | BLOB | Variable length binary string |
3 | blob | BLOB | Binary big object |
Date time | |||
1 | timestamp [ (p) ] [ without time zone ] | TIMESTAMP | Date and Time ( No time zone ) |
2 | timestamp [ (p) ] with time zone | TIMESTAMP() WITH TIME ZONE | Include date And time , Time zone |
3 | date | DATE | date |
4 | time [ (p) ] [ without time zone ] | DATE | Time of day |
5 | time [ (p) ] with time zone | DATE | Just one day Time , With time zone |
6 | interval year | NUMBER | The time interval |
7 | interval month | NUMBER | The time interval |
8 | interval day | NUMBER | The time interval |
9 | interval hour | NUMBER | The time interval |
10 | interval minute | NUMBER | The time interval |
11 | interval second | FLOAT | The time interval |
12 | interval year to month | INTERVAL YEAR() TO MONTH | The time interval |
13 | interval day to second | INTERVAL DAY() TO SECOND | The time interval |
Boolean type | |||
1 | boolean | NUMBER | The state is true or false |
Bit string type | |||
1 | bit(n) bit varying(n) | BLOB | a string 1 and 0 String of |
XML type | |||
1 | xml | XMLTYPE | Used to store XML data |
JSON type | |||
1 | JSON | JSON | Used to store JSON data |
2.2. Oracle Data type to KingbaseES Data type conversion
Serial number | Oracle data type | KingbaseES data type | remarks explain (Oracle) |
Numerical type | |||
1 | NUMBER(p,s) | numeric (precision, scale) | 1.0 x |image16| To 1.0 x |image17| |
2 | FLOAT | double | Number Subtypes of |
3 | BINARY_FLOAT | double | 4 byte , Single-precision floating-point |
4 | BINARY_DOUBLE | double | 8 byte , Double precision floating point |
Character | |||
1 | CHAR | char | Fixed length string |
2 | VARCHAR2 | varchar | Variable length string |
3 | NCHAR | char | Unicode Encoded string |
4 | NVARCHAR2 | varchar | Unicode Encoded string |
Date time | |||
1 | DATE | timestamp [ (p) ] [ without time zone ] | The date type |
2 | TIMESTAMP WITH TIME ZONE | timestamp [ (p) ] [ without time zone ] | Time type |
3 | TIMESTAMP() WITH TIME ZONE | timestamp [ (p) ] with time zone | Time type with time zone |
4 | TIMESTAMP() WITH LOCAL TIME ZONE | timestamp [ (p) ] with time zone | Time type with local time zone |
5 | INTERVAL DAY() TO SECOND | interval year to month | The time interval |
6 | INTERVAL YEAR() TO MONTH | interval day to second | The time interval |
Large object types | |||
1 | BLOB | blob | Binary big object |
2 | CLOB | clob | Character large object |
3 | NCLOB | clob | Storage Unicode data |
Other types | |||
1 | LONG | text | Store variable length strings |
2 | RAW | bytea | Store character data |
3 | LONG RAW | bytea | Store binary data such as images, documents, sounds |
4 | ROWID | varchar | length 64, Can be stored A-Z, a-z, 0-9, + / |
5 | UROWID | varchar | Storage Index -organized surface And the address of the external table |
边栏推荐
猜你喜欢

How strong is this glue?

Programmer growth Chapter 30: artifact of identifying true and false needs

这款全网热评的无线路由器,到底有什么特别?

苹果官网正在更新维护 Apple Store,国行 iPhone 13 / Pro 等产品将最高优惠 600 元

行泊ADAS摄像头前装搭载同比增长54.15%,TOP10供应商领跑

2022g3 boiler water treatment test simulation 100 questions simulation test platform operation

【自】-刷题-数组

【自】-刷题-动态规划

All aspect visual monitoring of istio microservice governance grid (microservice architecture display, resource monitoring, traffic monitoring, link monitoring)

Inheritance in swift
随机推荐
MySQL log management, backup and recovery
新一代超安全蜂窝电池 思皓爱跑上市13.99万元起售
The front mounted ADAS camera in parking increased by 54.15% year-on-year, with TOP10 suppliers taking the lead
解决线程安全问题&&单例模式
使用这个,你发的消息就无法被监控了
Neglected smart TV applet field
2022G3锅炉水处理考试模拟100题模拟考试平台操作
Solve the exception that all control files are damaged
Array array object
Zero vision technology completed the pre-A round of financing and promoted the domestic replacement of intelligent driving platform software
Object object
2022 R2 mobile pressure vessel filling test question simulation test platform operation
General addition, deletion, modification and query of custom MVC
行泊一体迎爆发期,抢量产还是修技术护城河?
【自】-刷题-BFS
深度剖析集成学习GBDT
深度剖析集成学习Xgboost(续)
2022焊工(初级)上岗证题目及答案
深度剖析集成学习Xgboost
二舅火了,全网刷屏,他凭什么能治好我的精神内耗?