数据类型
 
                  更新时间 2025-02-14 10:24:39
                 
 
                    最近更新时间: 2025-02-14 10:24:39
                  
 本页介绍天翼云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。
