Adding a new column is more than a schema change. It changes how data is stored, queried, and scaled. Whether you run PostgreSQL, MySQL, or a cloud-managed database, the operation touches performance, storage allocation, and application logic.
In SQL, the syntax is direct:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This command updates the schema in place. On small tables, it is instant. On large ones, it can lock writes and slow down reads. In production, that matters. Plan for zero-downtime migrations by creating the column first, backfilling data in batches, and only then enforcing constraints or making it NOT NULL.
For PostgreSQL, ALTER TABLE ... ADD COLUMN is fast if the column has no default. If you set a default value, the database may rewrite the entire table. MySQL behaves differently depending on storage engine and version. With InnoDB, recent versions support instant addition in many cases, but defaults can still trigger a full table rebuild.