A new column changes the shape of your dataset. It creates space for data that did not exist when you first built the table. In SQL, adding a new column is direct:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP;
This command alters the table definition while keeping the existing rows intact. New columns default to NULL unless you specify a default value. For example:
ALTER TABLE users
ADD COLUMN status VARCHAR(50) DEFAULT 'active';
When you add a column in production, think about the cost. Large tables take time to update, and locks may block writes. Many databases offer options like ADD COLUMN IF NOT EXISTS to avoid errors in migrations. In PostgreSQL, adding a column without constraints is usually fast because it only updates metadata. Adding NOT NULL or unique constraints can cause full table scans.
Schema migrations should be reversible. A bad column design can bloat your schema and slow queries. Plan your new columns with data types that fit the real size and purpose of the values. Avoid generic VARCHAR(255) when a smaller type or ENUM gives better performance.