Table Of Contents

6.1. Create table

6.1.1. Synopsis

CREATE TABLE table_name ( [
  { column_name data_type }
  [, ... ]
] )

6.1.2. Description

CREATE TABLE will create a new table in a QuasarDB cluster with the specified schema. A special timestamp column is automatically created, which is what new data will be indexed on.

6.1.3. Parameters

table_name
The name of the table to be created. Can be alphanumeric, but is not allowed to start with a number.
column_name
The name of a column to be created in the new table. Can be alphanumeric, but is not allowed to start with a number.
data_type
The data type to be associated with the column. Can be any of INT64, DOUBLE, BLOB or TIMESTAMP.

6.1.4. Examples

Create a table with only a single column:

CREATE TABLE example (my_int INT64)

Create a table with multiple columns:

CREATE TABLE example (my_int INT64, my_double DOUBLE, my_blob BLOB, my_ts TIMESTAMP)
arrow_backPrevious
6. Query language
Next arrow_forward
6.2. Drop table