A new column changes the shape of your data. It adds a field for information you could not track before. In SQL, adding one is direct:
ALTER TABLE users ADD COLUMN last_login TIMESTAMP;
This command alters the table structure without losing existing rows. For large datasets, consider ALTER TABLE performance. Some databases lock the table during the schema change. Others use non-blocking migrations. Always check your database engine’s documentation for ADD COLUMN behavior.
When creating a new column, define the data type explicitly. Do not rely on defaults. Decide if the column allows NULL or needs a NOT NULL constraint. If you add NOT NULL to an existing table without a default value, the migration will fail unless every row has a value. Assigning a default ensures consistent data from the moment the column exists.