CREATE clauses

CREATE
statements partially support
TABLE
and
INDEX
.
IMPORTANT:
CREATE
statements, including
TABLE
and
INDEX
, are not supported by the Influx database parser. Only explicit schema can be managed or modified using client API. For more information, see https://docs.influxdata.com/influxdb/cloud/admin/buckets/bucket-schema/.

Supported functionality

Examples of supported CREATE functionality
Expected behavior
Query to achieve the expected behavior
Create a unique index on a table.
CREATE UNIQUE INDEX Table_Index ON Table1 (Column1);
Create an index if it does not already exist.
CREATE INDEX IF NOT EXISTS Table_Index ON Table1 (Column1);
Create a table using a SELECT statement.
CREATE TABLE TempTable AS SELECT Column1 FROM MyTable WHERE Column1 > 5;
Create a temporary table using a SELECT statement.
CREATE TEMPORARY TABLE TempTable AS SELECT Column1 FROM MyTable WHERE Column1 > 5;

Unsupported functionality

  • CREATE statements for Influx database.
  • Advanced table creation methods with explicit column definitions.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal