A new column is one of the most common schema changes in any database. It sounds simple but it can break production if handled poorly. Adding a column changes the table structure. Queries, indexes, triggers, and application code all need to be aware of it. The database must update internal metadata while keeping existing data consistent.
In SQL, the syntax is direct:
ALTER TABLE orders
ADD COLUMN status VARCHAR(50) NOT NULL DEFAULT 'pending';
This works, but the impact depends on the database engine. In PostgreSQL, adding a new column with a default can lock the table if not done carefully. In MySQL, certain column changes rewrite the entire table. For large datasets, that means downtime.
Safe deployment of a new column starts with understanding how your database stores and alters data. On production systems, use online schema change tools when available. Break down large changes: first add the column as nullable without a default, backfill data in batches, then set a default or a constraint later.