Adding a new column is simple in theory and dangerous in practice. It alters a schema, shifts query performance, and can break assumptions baked deep into application code. Precision here matters more than speed.
The most direct way to add a new column in SQL is:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This runs instantly on small tables. On large, high-traffic tables, it may lock writes, inflate replication lag, and cause downtime. Some databases offer online DDL to reduce blocking. MySQL has ALGORITHM=INPLACE and LOCK=NONE. PostgreSQL can add a column with a default value of NULL instantly, but defaults with expressions can rewrite the whole table.
Choose data types that match intent. Avoid over-provisioning with TEXT when VARCHAR(255) is enough. Check existing indexes before deciding to add one for the new column; an unnecessary index will slow inserts and consume memory.