➕ Add a Column
Add a new column to an existing SQLite table. Limited to the end of the column list with no PRIMARY KEY, FOREIGN KEY, or UNIQUE constraints.
-- Add a nullable column ALTER TABLE users ADD COLUMN bio TEXT; -- Add a column with a default value ALTER TABLE users ADD COLUMN status TEXT NOT NULL DEFAULT 'active'; -- Add a column with a constant expression default ALTER TABLE users ADD COLUMN created_at TEXT DEFAULT CURRENT_TIMESTAMP; -- NOT NULL is only allowed if a DEFAULT is also provided ALTER TABLE users ADD COLUMN age INTEGER NOT NULL DEFAULT 0;
PRIMARY KEY, FOREIGN KEY, or UNIQUE constraint using ALTER TABLE.