A new column changes the data model. It widens the table, adds new dimensions, and unlocks queries that were impossible before. Every database—PostgreSQL, MySQL, SQLite, BigQuery—handles it slightly differently, but the intent is the same: extend the schema without breaking what works.
In SQL, adding a new column is simple:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This command updates the schema instantly in small datasets. On large tables, performance can become an issue. Some engines need a full table rewrite. Others use metadata-only operations, making it near-instant. Knowing the difference is the line between a seamless deploy and an outage.
A new column can be nullable, non-nullable, have a default value, or use generated expressions. Each choice has trade-offs. Nullable columns are faster to add, but can add conditional branches in application code. Non-nullable columns enforce constraints but may need careful data backfill. Defaults make migrations cleaner, but can increase lock times depending on the database.