A database consists of tables that store user data. You can create multiple columns with the create table statement. The data type follows the column name when adding columns.
CREATE TABLE [IF NOT EXISTS] tbl_name
(create_definition,...)
engine=columnstore [ DEFAULT CHARSET=character-set]
[COMMENT '[compression=0|1][;][autoincrement=col_name,start_value’]
CREATE TABLE [IF NOT EXISTS] tbl_name
{ LIKE old_table_name | (LIKE old_table_name) }
create_definition:
{ col_name column_definition }
column_definition:
data_type
[NOT NULL | NULL]
[DEFAULT default_value]
[COMMENT '[compression=0|1];[autoincrement=startvalue]']
All of these are ignored by ColumnStore.The following statement creates a table called orders with two columns: orderkey with datatype integer and customer with datatype varchar:
CREATE TABLE orders ( orderkey INTEGER, customer VARCHAR(45) ) ENGINE=ColumnStore
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/columnstore-create-table/