Create Tables
Copy-paste examples of how to create tables with SQL
Copy-paste examples of how to create tables with SQL
For the full table creation syntax, see CREATE TABLE.
For the full set of column types, see Column Types.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Any column type can have the nullability modified or have a comment applied. Column properties like dictionary encoding, text searchability, and the initial value modifiers are shown with all applicable column types.
|
|
|
|
|
|
|
|
|
|
|
|
Primary keys, shard keys, & foreign keys, are applicable to most column types. See the respective sections for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Column & low-cardinality indexes have wide column type applicability; while chunk skip, geospatial, CAGRA, & HNSW indexes are shown with all applicable column types. See the respective sections for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See sections on replicated, sharded, & randomly sharded tables for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See section on partitioning for details.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
See section on the tier strategy clause for details.
|
|
|
|
|
|
|
|
|
|