In relational databases, adding a new column is one of the most common schema changes. It is simple in theory, but the details matter. A new column changes storage, indexing, queries, and migrations. Poor planning can lock tables, block writes, and degrade performance.
The standard SQL syntax is direct:
ALTER TABLE table_name ADD COLUMN column_name data_type;
In MySQL, this can be instant for certain storage engines and data types, but not for all. In PostgreSQL, adding a column with a default value writes to every row unless you make it nullable first and then update in batches. For high-traffic systems, use ADD COLUMN without defaults or constraints, then backfill data asynchronously.
Indexing a new column requires more thought. Creating an index immediately after adding it will lock writes in some databases. Use concurrent index creation when available, such as CREATE INDEX CONCURRENTLY in PostgreSQL.