全数据库创建语句(包含所有数据类型)

【全数据库创建语句(包含所有数据类型)】注:如果有相同类型出现多次,则创建时为不同类型。创建语句以创建完成后显示SQL为准
Hive

-- auto-generated definition create table table1 ( column1tinyint, column2smallint, column3bigint, column4int, column5float, column6double, column7decimal(8, 2), column8timestamp, column9date, column10 string, column11 varchar(100), column12 char(100), column13 boolean, column14 binary, column15 array, column16 struct, column17 uniontype ) row format serde 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' stored as inputformat 'org.apache.hadoop.mapred.TextInputFormat' outputformat 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat' location 'hdfs://hadoop67:9000/opt/hive/warehouse/wzw.db/table1';

TiDB
create table `table1` ( `column1`tinyint(8)default null, `column2`smallint(8)default null, `column3`mediumint(8)default null, `column4`int(8)default null, `column5`bigint(8)default null, `column6`float(8, 2)default null, `column7`double(8, 2)default null, `column8`decimal(8, 2)default null, `column9`datedefault null, `column10` timedefault null, `column11` year(4)default null, `column12` datetimedefault null, `column13` timestamp null default null, `column14` char(8)default null, `column15` varchar(8)default null, `column16` tinyblobdefault null, `column17` tinytextdefault null, `column18` tinyblobdefault null, `column19` tinytextdefault null, `column20` mediumblobdefault null, `column21` mediumtextdefault null, `column22` longblobdefault null, `column23` longtextdefault null ) engine = InnoDB default charset = utf8mb4 collate = utf8mb4_bin

MariaDB
create table `table1` ( `column1`tinyint(8)default null, `column2`tinyint(1)default null, `column3`smallint(8)default null, `column4`mediumint(8)default null, `column5`int(8)default null, `column6`bigint(8)default null, `column7`decimal(8, 2)default null, `column8`float(8, 2)default null, `column9`double(8, 2)default null, `column10` bit(8)default null, `column11` datedefault null, `column12` timedefault null, `column13` datetimedefault null, `column14` timestamp nulldefault null, `column15` year(4)default null, `column16` char(8)default null, `column17` varchar(8)default null, `column18` binary(8)default null, `column19` varbinary(8)default null, `column20` tinyblobdefault null, `column21` tinyblobdefault null, `column22` mediumblobdefault null, `column23` longblobdefault null, `column24` tinytextdefault null, `column25` tinytextdefault null, `column26` mediumtextdefault null, `column27` longtextdefault null, `column28` enum ('哺乳动物','非哺乳动物')default null, `column29` set ('value1','value2') default null ) engine = InnoDB default charset = utf8

KunDB
create table `table1` ( `column1`tinyintdefault null, `column2`smallintdefault null, `column3`mediumintdefault null, `column4`intdefault null, `column5`bigintdefault null, `column6`float(8, 2)default null, `column7`double(8, 2)default null, `column8`decimal(8, 2)default null, `column9`datedefault null, `column10` timedefault null, `column11` yeardefault null, `column12` datetimedefault null, `column13` timestamp nulldefault null, `column14` char(8) collate utf8mb4_bindefault null, `column15` varchar(8) collate utf8mb4_bin default null, `column16` tinyblob, `column17` tinytext collate utf8mb4_bin, `column18` tinyblob, `column19` tinytext collate utf8mb4_bin, `column20` mediumblob, `column21` mediumtext collate utf8mb4_bin, `column22` longblob, `column23` longtext collate utf8mb4_bin ) engine = InnoDB default charset = utf8mb4 collate = utf8mb4_bin

PostgreSQL
-- DROP TABLE table1; create table table1 ( colum1int2null, colum2int4null, colum3int8null, colum4numeric(8, 2) null, colum5numeric(8, 2) null, colum6float4null, colum7float8null, colum8smallserialnot null, colum9serialnot null, colum10 bigserialnot null, colum11 moneynull, colum12 varchar(8)null, colum13 varchar(8)null, colum14 bpchar(8)null, colum15 bpchar(8)null, colum16 textnull, colum17 timestamp(6)null, colum18 datenull, colum19 time(6)null, colum20 interval(6)null, colum21 boolnull, colum22 pointnull, colum23 linenull, colum24 lsegnull, colum25 boxnull, colum26 pathnull, colum27 polygonnull, colum28 circlenull, colum29 cidrnull, colum30 tsvectornull, colum31 jsonnull, colum32 xmlnull, colum33 _int4null, colum34 _textnull, colum35 _int4null, colum36 uuidnull );

    推荐阅读