-- @owner:opentestcase007
-- @date:2020/9/29
-- @testpoint:openGauss关键字boolean(非保留),作为列名带双引号,使用时不带,插入成功
--创建表
drop table if exists boolean_test;
SQL SUCCESS
create table boolean_test(
c_id int, c_int int, c_integer integer, c_bool int, c_boolean int, c_bigint integer,
c_real real, c_double real,
c_decimal decimal(38), c_number number(38), c_numeric numeric(38),
c_char char(50) default null, c_varchar varchar(20), c_varchar2 varchar2(4000),
c_date date, c_datetime date, c_timestamp timestamp,
"boolean" char(50)
)
PARTITION BY RANGE (c_integer)
(
partition P_20180121 values less than (0),
partition P_20190122 values less than (50000),
partition P_20200123 values less than (100000),
partition P_max values less than (maxvalue)
);
SQL SUCCESS
--向表中插入数据
insert into boolean_test(c_id,boolean) values(2,'china');
SQL SUCCESS
--查询表结构
select * from boolean_test;
+------+-------+-----------+--------+-----------+----------+--------+----------+-----------+----------+-----------+--------+-----------+------------+--------+------------+-------------+----------------------------------------------------+
| c_id | c_int | c_integer | c_bool | c_boolean | c_bigint | c_real | c_double | c_decimal | c_number | c_numeric | c_char | c_varchar | c_varchar2 | c_date | c_datetime | c_timestamp | boolean |
+------+-------+-----------+--------+-----------+----------+--------+----------+-----------+----------+-----------+--------+-----------+------------+--------+------------+-------------+----------------------------------------------------+
| 2 | | | | | | | | | | | | | | | | | china |
+------+-------+-----------+--------+-----------+----------+--------+----------+-----------+----------+-----------+--------+-----------+------------+--------+------------+-------------+----------------------------------------------------+
--清理环境
drop table boolean_test;
SQL SUCCESS