The table is ready, the schema is set, but the data needs room to grow. You add a new column. It sounds small, but it changes everything.
A new column is more than extra space. In SQL, it reshapes the dataset. It shifts indexes, affects queries, and can trigger migrations that ripple through your application. Every ALTER TABLE is a decision with cost. Done right, it extends capability. Done wrong, it slows performance, risks downtime, and breaks integrations.
In relational databases, adding a new column is straightforward but never trivial. The syntax is simple:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
On small tables, it runs fast. On massive ones, it can lock writes and delay reads. Some SQL engines rewrite entire tables to add a column. Others use metadata-only changes that complete in milliseconds. Understanding your database engine matters. PostgreSQL handles adding nullable columns without touching the data. MySQL may block during schema change unless you're using InnoDB with online DDL enabled.
Default values change the equation. Adding a column with a constant default writes data into every row, which can be expensive. Nullable columns with no default avoid the rewrite but put the burden on application logic to handle null states.