The query finished running, but the schema had changed. A new column sat in the result set, unannounced and unhandled.
Adding a new column to a database table is simple in syntax but heavy in consequence. The decision affects data models, queries, indexes, and downstream systems. The command that makes it happen—ALTER TABLE ... ADD COLUMN—is deceptively small. Yet it touches every row, every join, every view.
Before adding a column, define its data type, default value, and nullability. Choosing the wrong type forces future migrations and downtime. Setting an inappropriate default can bloat disk usage or cause logical errors in application code.
Monitor performance. On large tables, adding a new column without careful planning can lock writes and block queries. For PostgreSQL, adding a nullable column without a default is fast. Adding one with a default rewrites the table. MySQL and SQL Server have their own variations; always check engine-specific documentation before running the change in production.