Table Of Contents

6.5. Alter table

6.5.1. Synopsis

ALTER TABLE <table_name> ADD
  { <column_name> <data_type> }
  [, ... ]

6.5.2. Description

ALTER TABLE will modify an existing table in a QuasarDB cluster by adding columns with the specified schema.

6.5.3. Parameters

table_name
The name of the table to be modified. Can be alphanumeric, but is not allowed to start with a number.
column_name
The name of a column to be added to the 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.5.4. Examples

Add a single column to an existing table:

ALTER TABLE example ADD my_int INT64

Add multiple columns to an existing table:

ALTER TABLE example ADD my_int INT64, my_double DOUBLE, my_blob BLOB, my_ts TIMESTAMP
arrow_backPrevious
6.4. Drop table
Next arrow_forward
6.6. Function & Operators