Adding a new column is one of the most common changes in database work, yet it is also one of the most impactful. Schema evolution must be deliberate. A single alteration can change how applications read, write, and store data. Performance, storage costs, and query speed are all at stake.
To create a new column, start by defining its purpose. Know exactly what data it will hold. Choose the right data type—integer, text, timestamp, boolean—based on how that data will be used. Select sane defaults and constraints to guard data integrity.
In SQL:
ALTER TABLE users
ADD COLUMN last_login TIMESTAMP DEFAULT CURRENT_TIMESTAMP;
This is clear, explicit, and easy to audit. But in production systems, adding a new column demands more than a single line. Think about indexing only if queries will filter or sort on it. Consider nullability; a non-null column with no default will break inserts until the application is updated.