The query finished running, but the numbers didn’t line up. The fix was simple: add a new column.
A new column changes the shape of your data. In SQL, it alters the table structure without losing existing rows. In analytics platforms, it can hold calculated results or track state over time. In spreadsheets, it’s a fast way to extend a dataset without breaking formulas. The principle is the same: a new column stores more information in a format your tools can use immediately.
In relational databases, you create a new column with an ALTER TABLE statement. You define the column name, data type, and constraints. For example:
ALTER TABLE orders
ADD COLUMN shipped_at TIMESTAMP NULL;
This command updates the schema instantly. Existing rows get NULL for the new column unless you set a default. For large datasets, plan the change carefully to avoid locking the table longer than necessary. Use database migration tools to track and version these changes.