SQL Schema
XTDB’s schema is largely inferred, but you may create tables ahead-of-time if required, to prevent table-not-found or column-not-found errors.
Normally this isn’t required - you can simply INSERT data to get started.
CREATE TABLE (v2.2+)
Section titled “CREATE TABLE (v2.2+)”Tables can be created or altered with the CREATE TABLE statement.
- Column names are optional and do not yet support a type declaration.
CREATE TABLEdoes not fail if the table exists; any columns declared will be added to the existing table.
e.g.:
CREATE TABLE users (_id, name, email);