Adding a new column should be simple. In SQL, it starts with ALTER TABLE. The command defines the target table and the column name, along with its data type and constraints. For example:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP DEFAULT NOW();
This executes instantly on small datasets. On large tables, it may lock writes or trigger a full table rewrite depending on the database engine. PostgreSQL handles many column additions without rewriting data if you add a column with a constant default and no NOT NULL constraint. MySQL and MariaDB often require more care, especially under load.
Column naming matters. Use short, clear names. Avoid reserved keywords. Set the data type to match the smallest size that covers all expected values. Apply NOT NULL only if the data will always exist; otherwise, leave it nullable to avoid migration delays.