In SQL, adding a new column changes the shape of your table and the options for how your application uses it. Whether you work in PostgreSQL, MySQL, or SQLite, the ALTER TABLE statement is the command you use. The basic form is:
ALTER TABLE table_name
ADD COLUMN column_name data_type;
This creates the column at the end of the table with the type you define. You can also set defaults, constraints, and NOT NULL rules at creation to avoid errors later.
Performance matters when adding a new column, especially on large datasets. Some databases rewrite the entire table. Others, like newer versions of PostgreSQL, can add certain column types instantly if defaults are NULL. Use DEFAULT values carefully—adding a non-nullable column to a large table with a fixed default can lock writes and slow reads until the operation finishes.
If you need to rename or drop a column later, the commands are simple but can still be disruptive: