The query runs. The numbers return. But the table is wrong—missing the new column you need to make sense of the data.
Adding a new column should be a surgical action: precise, fast, and safe. In SQL, it starts with ALTER TABLE, the definitive command for evolving schemas without replacing them.
ALTER TABLE orders
ADD COLUMN delivery_date DATE;
Once executed, the table structure changes instantly. Existing rows gain the new column with NULL values by default. From here, you can populate the field with an update statement or set a default to avoid null states.
For large datasets in production, adding a new column can lock the table depending on your database engine. Postgres, MySQL, SQL Server, and SQLite each handle this differently. Postgres allows many ADD COLUMN operations without a full rewrite if no default value is assigned. MySQL can stall long-running transactions if the table is large. Always test schema changes in a staging environment before applying to live systems.