CREATE TABLE / ALTER TABLE / DROP TABLE
Feb 23, 2026
·
5
min read
Category: Data Definition Language (DDL)
Platform Support:
✅ Snowflake | ✅ BigQuery | ✅ Databricks
Description
CREATE TABLE defines a new table structure, ALTER TABLE modifies an existing table, and DROP TABLE removes a table. These DDL operations define and manage the schema and structure of database objects.
CREATE TABLE Syntax
ALTER TABLE Syntax
DROP TABLE Syntax
Platform-Specific Notes
Snowflake:
Supports transient and temporary tables
Time Travel available (can undrop tables)
Supports clustering keys
Schema evolution with ALTER
CLONE for zero-copy cloning
BigQuery:
Automatically managed storage
Partitioned and clustered tables
External tables for data in GCS
Table expiration settings
Schema changes are atomic
Databricks:
Delta Lake tables recommended
Supports managed and external tables
Schema evolution with MERGE
Liquid clustering
Unity Catalog for governance
Example 1: CREATE TABLE - Basic
All Platforms:
Result: New table created with specified schema
Example 2: CREATE TABLE with Constraints
All Platforms:
Example 3: CREATE TABLE AS SELECT (CTAS)
All Platforms:
Result: New table with data from SELECT query
Example 4: Platform-Specific CREATE TABLE
Snowflake - Partitioned Table:
BigQuery - Partitioned and Clustered:
Databricks - Delta Table:
Example 5: ALTER TABLE - Add Columns
All Platforms:
customers table BEFORE:
customer_id | first_name | last_name | |
|---|---|---|---|
1 | John | Smith |
customers table AFTER:
customer_id | first_name | last_name | loyalty_points | preferred_contact | marketing_opt_in | last_login | |
|---|---|---|---|---|---|---|---|
1 | John | Smith | 0 | FALSE | NULL |
Example 6: ALTER TABLE - Modify Columns
Snowflake:
BigQuery:
Databricks:
Example 7: DROP TABLE
All Platforms:
Snowflake - Undrop:
Example 8: Temporary and Transient Tables
Snowflake:
BigQuery:
Databricks:
Data Types by Platform
Category | Snowflake | BigQuery | Databricks |
|---|---|---|---|
Integer | INT, BIGINT | INT64 | INT, BIGINT |
Decimal | DECIMAL(p,s), NUMBER | NUMERIC, DECIMAL | DECIMAL(p,s) |
String | VARCHAR, STRING | STRING | STRING, VARCHAR |
Boolean | BOOLEAN | BOOL | BOOLEAN |
Date | DATE | DATE | DATE |
Timestamp | TIMESTAMP | TIMESTAMP | TIMESTAMP |
JSON | VARIANT, OBJECT | JSON | STRING |
Array | ARRAY | ARRAY | ARRAY |
Common Constraints
Constraint | Purpose | Example |
|---|---|---|
PRIMARY KEY | Unique identifier |
|
FOREIGN KEY | Referential integrity |
|
UNIQUE | No duplicates |
|
NOT NULL | Required value |
|
CHECK | Value validation |
|
DEFAULT | Default value |
|
Common Use Cases
CREATE TABLE: Define new data structures, staging tables
ALTER TABLE: Add columns, schema evolution, rename
DROP TABLE: Clean up temporary tables, remove obsolete data
CTAS: Create summary/aggregation tables, backups
Best Practices
Use appropriate data types: Choose smallest type that fits data
Add constraints: Ensure data quality at schema level
Document tables: Add comments describing purpose
Use IF EXISTS: Safer DROP operations
Plan for growth: Consider partitioning for large tables
Version control DDL: Track schema changes
Test in dev first: Validate changes before production
Backup before ALTER: Safety first for production tables
Use descriptive names: Clear table and column names
Consider indexing: Add indexes for query performance





