數據類型
更新時間 2025-02-05 09:37:11
最近更新時間: 2025-02-05 09:37:11
分享文章
本頁介紹天翼云TeleDB數據庫Oracle兼容語法的數據類型。
varchar2
teledb=# create table t_varchar2(f1 varchar2,f2 int);
CREATE TABLE
teledb=# \d+ t_varchar2
Table "public.t_varchar2"
Column | Type | Collation | Nullable | Default | Storage | Stats target |
Description
--------+----------+-----------+----------+---------+----------+--------------+-
------------
f1 | varchar2 | | | | extended | |
f2 | integer | | | | plain | |
Distribute By: SHARD(f1)
Location Nodes: ALL DATANODES
teledb=#
number
teledb=# create table t_number(f1 number,f2 number(10),f3 number(10,2));
CREATE TABLE
teledb=# \d t_number
Table "public.t_number"
Column | Type | Collation | Nullable | Default
--------+---------------+-----------+----------+---------
f1 | numeric | | |
f2 | numeric(10,0) | | |
f3 | numeric(10,2) | | |
系統轉換成numeric。
blob
teledb=# create table t_blob(f1 int,f2 Blob);
CREATE TABLE
teledb=# \d t_blob
Table "public.t_blob"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
f1 | integer | | |
f2 | blob | | |
Teledb的blob類型支持最大長度為1G。
clob
teledb=# create table t_clob(f1 int,f2 clob);
CREATE TABLE
teledb=# \d t_clob
Table "public.t_clob"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
f1 | integer | | |
f2 | clob | | |
TeleDB的clob類型支持最大長度為1G。