How to Add a Column in MySQL

Last updated July 24, 2026 · By the SaturnSQL team

Use ALTER TABLE ... ADD COLUMN. Since MySQL 8.0 adding a column is usually an instant metadata change. Use AFTER to control position, and add several columns in one ALTER.

New rows get the default and existing rows are backfilled with it. On MySQL 8.0 with InnoDB this is usually an INSTANT operation touching only metadata, so it finishes in milliseconds even on a large table. Adding a nullable column with no default is instant too.

ALTER TABLE orders ADD COLUMN discount DECIMAL(5,2) DEFAULT 0;

Position and multiple columns

AFTER places the column at a specific position and FIRST puts it at the front. Position is cosmetic, but it changes SELECT * ordering, which matters if anything downstream depends on it. Combining changes into one ALTER is faster than separate statements. Add ALGORITHM=INSTANT if you want MySQL to raise an error rather than silently fall back to a full table rebuild.

ALTER TABLE orders
  ADD COLUMN status VARCHAR(20) AFTER amount,
  ADD COLUMN updated_at TIMESTAMP NULL;

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

Related MySQL guides