KADB 是北京人大金仓信息技术股份有限公司基于开源的greenplum数据库研发的一款分布式关系型数据库,全称是KingbaseAnalyticsDataBase。
学习kadb的基本数据类型
连接测试数据库;
psql postgres
手动执行基本数据类型测试语句集;
1、数值型
CREATE TABLE t_type(a smallint, b int, c bigint, d real, e float ,f double precision ,g decimal(1000,500));
INSERT INTO t_type VALUES (1,2,3,4,5.0,6.01,7.01);
drop table t_type;
2、字符型
CREATE TABLE t_type1(a char(3000), b varchar(3000));
INSERT INTO t_type1 VALUES ('a','aaaa');
drop table t_type1;
3、日期和时间类型
CREATE TABLE t_type3(a date, b time, c timestamp,d interval);
INSERT INTO t_type3 VALUES ('2018-09-10','00:00:01' , '2018-09-10 00:00:01', '1 year');
drop table t_type3;
4、布尔型
CREATE TABLE t_type4(a boolean);
INSERT INTO t_type4 VALUES ('TRUE');
update t_type4 set a = 'FALSE ';
drop table t_type4;
支持数值型小数类型DECIMAL(m,n);整数类型INT/SMALLINT/BIGINT;浮点数类型REAL/DOUBLE/FLOAT,支持字符型定长CHAR(n);不定长VARCHAR(n) ,支持日期和时间类型DATE/TIME/TIMESTAMP,支持布尔型TRUE/FALSE。