Change the table name without recreating data.

Section: Change schemas safely

Rename a table

sql
sql
ALTER TABLE users RENAME TO app_users;
Explanation

Useful during refactors or when aligning names with a new domain model.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Change schemas safely
Add a column
Append a new nullable or defaulted column.
OpenIn sheetsqlsame section
Rename a column
Adjust a column name in-place.
OpenIn sheetsqlsame section
Rebuild a table for complex changes
Canonical pattern for dropping constraints or changing types.
OpenIn sheetsqlsame section
Create a basic table
Define a rowid-backed table with primary key and timestamps.
OpenIn sheetsql1 tag match
Use a CHECK constraint
Validate allowed values at the database layer.
OpenIn sheetsql1 tag match
Add a foreign key
Reference a parent table from a child table.
OpenIn sheetsql1 tag match