The query ran. The table stared back. You needed a new column, but the shape of the data was fixed and old.
Adding a new column is not just schema change. It is a decision. It defines how future queries run, what indexes matter, and which joins stay cheap. In SQL, the ALTER TABLE command creates a new column in place. The syntax is direct:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP;
This works fast on small datasets. On massive ones, it can lock the table, force a rewrite, or slow production. Many databases now support online schema change to avoid downtime. MySQL has ALGORITHM=INPLACE. PostgreSQL allows adding nullable columns instantly if they have no default. For large defaults, create the column first, then backfill rows in controlled batches.
In NoSQL systems, adding a new column is often a matter of inserting new keys. But the cost shifts to the application layer, where code must handle missing values. For distributed databases, schema evolution should be tested under production-like loads.