How to Rename a Table in MySQL
Last updated July 24, 2026 · By the SaturnSQL team
Use RENAME TABLE old TO new, which is atomic and can rename several tables at once. ALTER TABLE ... RENAME TO does the same for a single table.
RENAME TABLE orders TO customer_orders;Swap two tables atomically
A common deploy trick: build a new table, then swap it in a single atomic statement.
RENAME TABLE orders TO orders_old, orders_new TO orders;Run this in SaturnSQL
SaturnSQL is a browser-based SQL editor for teams: shared query library, schema-aware autocomplete, and scheduled exports to Google Sheets and Slack.
Try it free