數據類型
更新時間 2025-02-14 10:23:37
最(zui)近(jin)更(geng)新時間: 2025-02-14 10:23:37
分享文章
本頁(ye)介紹天翼云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類(lei)型支持最大長度為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類型支持(chi)最(zui)大長(chang)度(du)為1G。