github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/table/create_table.result (about) 1 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)); 2 create table table15 (a varchar(5) default 'abcde'); 3 create temporary table table05 ( a int, b char(10)); 4 create table table06 (a int primary key, b varchar(10)); 5 create table table10 (a int primary key, b varchar(10)); 6 create table `测试表` (`测试1` int); 7 create table `table11 ` (a int); 8 create table table12 (`a ` int); 9 create table `a/a` (a int); 10 create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int); 11 create table table14 (`aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` int); 12 create table table16 (1a20 int,1e int); 13 create table $table18 (a$1 int, $b int, c$ int); 14 create table table19$ (a int); 15 create table table17 (`index` int); 16 create table account(a int); 17 show tables; 18 Tables_in_create_table 19 table01 20 table15 21 table06 22 table10 23 测试表 24 table11 25 table12 26 a/a 27 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 28 table14 29 table16 30 $table18 31 table19$ 32 table17 33 account 34 create table test01(a int primary key, b int) cluster by a; 35 not supported: cluster by with primary key is not support 36 create table test01(a int, b int) cluster by a; 37 create table test02(a int, b int) cluster by b; 38 insert into test01 values(1,1),(2,2),(3,null),(null,4); 39 40 select * from test01; 41 a b 42 1 1 43 2 2 44 3 null 45 null 4 46 insert into test02 select * from test01; 47 48 select * from test02; 49 a b 50 1 1 51 2 2 52 3 null 53 null 4 54 update test02 set b=null where a=1; 55 56 select * from test02; 57 a b 58 2 2 59 3 null 60 null 4 61 1 null 62 create table test03(a int, b int) cluster by c; 63 invalid input: column 'c' doesn't exist in table 64 create table test04(a int, b int, c varchar(10), unique key(a)) cluster by (b,c,a); 65 insert into test04 values(11,3,'bb'); 66 insert into test04 values(1,2,'a'); 67 insert into test04 values(2,2,''); 68 insert into test04 values(3,2,null); 69 70 select * from test04; 71 a b c 72 11 3 bb 73 1 2 a 74 2 2 75 create table test06(a int, b int, c varchar(10)) cluster by (b,a,c); 76 insert into test06 select * from test04; 77 select * from test06; 78 a b c 79 11 3 bb 80 1 2 a 81 2 2 82 update test06 set c=null where a=11; 83 84 select * from test06; 85 a b c 86 11 3 bb 87 1 2 a 88 2 2 89 insert into test06 select * from test04; 90 select * from test06; 91 a b c 92 11 3 bb 93 1 2 a 94 2 2 95 11 3 bb 96 1 2 a 97 2 2 98 update test06 set c=a where b=2; 99 select * from test06; 100 a b c 101 11 3 bb 102 11 3 bb 103 1 2 1 104 2 2 2 105 1 2 1 106 2 2 2 107 create table test05(a int, b int, c varchar(10)) cluster by (b,c,d); 108 invalid input: column 'd' doesn't exist in table 109 create temporary table test05(a int, b int, c varchar(10)) cluster by (b,c); 110 not supported: cluster by with temporary table is not support 111 show create table test01; 112 Table Create Table 113 test01 CREATE TABLE `test01` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL\n) CLUSTER BY (`a`) 114 show create table test02; 115 Table Create Table 116 test02 CREATE TABLE `test02` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL\n) CLUSTER BY (`b`) 117 show create table test04; 118 Table Create Table 119 test04 CREATE TABLE `test04` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL,\n`c` VARCHAR(10) DEFAULT NULL,\nUNIQUE KEY `a` (`a`)\n) CLUSTER BY (`b`, `c`, `a`) 120 show create table test06; 121 Table Create Table 122 test06 CREATE TABLE `test06` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL,\n`c` VARCHAR(10) DEFAULT NULL\n) CLUSTER BY (`b`, `a`, `c`) 123 desc test01; 124 Field Type Null Key Default Extra Comment 125 a INT YES NULL 126 b INT YES NULL 127 desc test02; 128 Field Type Null Key Default Extra Comment 129 a INT YES NULL 130 b INT YES NULL 131 desc test04; 132 Field Type Null Key Default Extra Comment 133 a INT YES NULL 134 b INT YES NULL 135 c VARCHAR(10) YES NULL 136 desc test06; 137 Field Type Null Key Default Extra Comment 138 a INT YES NULL 139 b INT YES NULL 140 c VARCHAR(10) YES NULL 141 drop table test01; 142 drop table test02; 143 drop table test04; 144 drop table test06; 145 drop table if exists t1; 146 create table t1(a int, b int, unique key(a), unique key(a, b)); 147 show create table t1; 148 Table Create Table 149 t1 CREATE TABLE `t1` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL,\nUNIQUE KEY `a` (`a`),\nUNIQUE KEY `a_2` (`a`,`b`)\n) 150 drop table if exists t1; 151 create table t1(a int unique, b int unique key, unique key(a)); 152 show create table t1; 153 Table Create Table 154 t1 CREATE TABLE `t1` (\n`a` INT DEFAULT NULL,\n`b` INT DEFAULT NULL,\nUNIQUE KEY `a` (`a`),\nUNIQUE KEY `b` (`b`),\nUNIQUE KEY `a_2` (`a`)\n) 155 drop table t1; 156 create table test (`a` varchar(255) DEFAULT b'0'); 157 insert into test values (), (); 158 select * from test; 159 a 160 0 161 0 162 drop table if exists products; 163 create table products ( 164 pid int not null, 165 pname varchar(50) not null, 166 description varchar(20) not null, 167 price decimal(9,2) not null); 168 desc products; 169 Field Type Null Key Default Extra Comment 170 pid INT NO NULL 171 pname VARCHAR(50) NO NULL 172 description VARCHAR(20) NO NULL 173 price DECIMAL(9,2) NO NULL 174 drop table products;