Adding a new column seems simple, but every choice here has consequences. Data type, nullability, default values, and constraints are not decoration. They determine performance, integrity, and how your application behaves under load. A VARCHAR isn’t just text. A TIMESTAMP isn’t just time. Rows grow, indexes shift, and queries may slow if you add a new column without planning.
In SQL, you create a new column with:
ALTER TABLE orders
ADD COLUMN shipped_at TIMESTAMP;
That command runs fast on small datasets, but on tables with millions of rows, the migration can lock writes. On PostgreSQL, adding a column with a default value rewrites the whole table, unless you assign the default later. In MySQL, the order of columns may matter for storage alignment. In SQLite, certain schema changes recreate the table behind the scenes.