github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/table/create_table.test (about)

     1  
     2  create table table01(a TINYINT primary key, b SMALLINT SIGNED, c INT UNSIGNED,d BIGINT not null , e FLOAT,f DOUBLE, g CHAR(10), h VARCHAR(20));
     3  create table table15 (a varchar(5) default 'abcde');
     4  create temporary table table05 ( a int, b char(10));
     5  create table table06 (a int primary key, b varchar(10));
     6  create table table10 (a int primary key, b varchar(10));
     7  create table `测试表` (`测试1` int);
     8  create table `table11 ` (a int);
     9  create table table12 (`a ` int);
    10  create table `a/a` (a int);
    11  create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int);
    12  create table table14 (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int);
    13  create table table16 (1a20 int,1e int);
    14  create table $table18 (a$1 int, $b int, c$ int);
    15  create table table19$ (a int);
    16  create table table17 (`index` int);
    17  create table account(a int);
    18  show tables;
    19  create table test01(a int primary key, b int) cluster by a;
    20  create table test01(a int, b int) cluster by a;
    21  create table test02(a int, b int) cluster by b;
    22  -- @bvt:issue#7565
    23  insert into test01 values(1,1),(2,2),(3,null),(null,4);
    24  select * from test01;
    25  insert into test02 select * from test01;
    26  select * from test02;
    27  update test02 set b=null where a=1;
    28  select * from test02;
    29  -- @bvt:issue
    30  create table test03(a int, b int) cluster by c;
    31  create table test04(a int, b int, c varchar(10), unique key(a)) cluster by (b,c,a);
    32  insert into test04 values(11,3,'bb');
    33  insert into test04 values(1,2,'a');
    34  insert into test04 values(2,2,'');
    35  -- @bvt:issue#7565
    36  insert into test04 values(3,2,null);
    37  -- @bvt:issue
    38  select * from test04;
    39  create table test06(a int, b int, c varchar(10)) cluster by (b,a,c);
    40  insert into test06 select * from test04;
    41  select * from test06;
    42  -- @bvt:issue#7565
    43  update test06 set c=null where a=11;
    44  -- @bvt:issue
    45  select * from test06;
    46  insert into test06 select * from test04;
    47  select * from test06;
    48  update test06 set c=a where b=2;
    49  select * from test06;
    50  create table test05(a int, b int, c varchar(10)) cluster by (b,c,d);
    51  create temporary table test05(a int, b int, c varchar(10)) cluster by (b,c);
    52  show create table test01;
    53  show create table test02;
    54  show create table test04;
    55  show create table test06;
    56  desc test01;
    57  desc test02;
    58  desc test04;
    59  desc test06;
    60  drop table test01;
    61  drop table test02;
    62  drop table test04;
    63  drop table test06;
    64  drop table if exists t1;
    65  create table t1(a int, b int, unique key(a), unique key(a, b));
    66  show create table t1;
    67  drop table if exists t1;
    68  create table t1(a int unique, b int unique key, unique key(a));
    69  show create table t1;
    70  drop table t1;
    71  
    72  create table test (`a` varchar(255) DEFAULT b'0');
    73  insert into test values (), ();
    74  select * from test;
    75  
    76  drop table if exists products;
    77  create table products (
    78  pid int not null,
    79  pname varchar(50) not null,
    80  description varchar(20) not null,
    81  price decimal(9,2) not null);
    82  desc products;
    83  drop table products;