CREATE TABLE builds a new, structured table in your Snowflake database, defining columns, data types, defaults, and constraints.
CREATE TABLE initializes a brand-new, permanently stored table inside a specified Snowflake database and schema. It lets you describe columns, data types, defaults, constraints, clustering keys, and file format options for later data loading.
Start with CREATE TABLE, give the fully qualified name, list columns with data types, then add optional constraints or table options. Add OR REPLACE to rebuild, or IF NOT EXISTS to skip if the table already exists.
Use CREATE TABLE new_table LIKE existing_table to duplicate column definitions only, or CREATE TABLE new_table CLONE existing_table to copy both structure and data instantly without extra storage.
Add DEFAULT expressions after a column definition to pre-populate missing values. Enforce data integrity with NOT NULL, UNIQUE, and PRIMARY KEY constraints. Snowflake accepts but does not enforce FOREIGN KEY constraints for documentation purposes.
Specify CLUSTER BY for large fact tables to speed partition pruning. Turn on CHANGE_TRACKING to enable incremental MERGE and stream processing. Use transient tables for scratch data that does not need Fail-safe retention.
Include COMMENT clauses so future analysts understand each column. Add COPY GRANTS when replacing a table to preserve privileges. Use column masking policies to protect PII automatically.
Pick precise data types (NUMBER instead of VARCHAR) to shrink storage. Document business logic with COMMENTS. Prefer CLONE for fast environment refreshes. Always version control DDL in Git.
No. Snowflake’s metadata services create tables instantly without blocking concurrent queries.
Yes. Use ALTER TABLE to add, drop, or modify columns, constraints, and options without data loss.
LIKE copies only structure; CLONE creates a zero-copy snapshot of both structure and data, using minimal storage.