Adding a new column sounds simple. It can be. But in production, the wrong move can lock tables, drop queries, and stall revenue. Precision matters.
A new column in SQL starts with an ALTER TABLE statement. The common form is:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This works for a small table. On large data sets, it can block writes for minutes or hours. Use an online schema change tool or a database feature like ADD COLUMN with DEFAULT NULL to avoid full rewrites. MySQL, Postgres, and modern cloud databases have different behaviors. Test before you run in production.
Always define the column type, nullability, and default value up front. Changing them later often triggers costly table rewrites. If the new column will be part of an index, create it in a separate migration to control lock scope.