← CodePrimer
SQL Intermediate Database

ALTER TABLE add column

How do I add a column to an existing table?

ALTER TABLE ... ADD.

Sample
ALTER TABLE students
  ADD COLUMN year_level TINYINT UNSIGNED NULL AFTER email;

Notes

Plan defaults/nullability before altering production tables.

Keywords: alter · add column · migrate

Related

Need more coins?

You do not have enough coins for this action.

Your balance: 0 coins

Share