Add new column to existing table

Here are the steps to add a new column to an existing table in various databases:

MySQL

ALTER TABLE table_name
ADD COLUMN new_column_name data_type;

Example:

ALTER TABLE customers
ADD COLUMN email VARCHAR(255);

PostgreSQL

ALTER TABLE table_name
ADD COLUMN new_column_name data_type;

Example:

ALTER TABLE customers
ADD COLUMN email VARCHAR(255);

Microsoft SQL Server

ALTER TABLE table_name
ADD new_column_name data_type;

Example:

ALTER TABLE customers
ADD email VARCHAR(255);

Oracle

ALTER TABLE table_name
ADD (new_column_name data_type);

Example:

ALTER TABLE customers
ADD (email VARCHAR2(255));

SQLite

ALTER TABLE table_name
ADD COLUMN new_column_name data_type;

Example:

ALTER TABLE customers
ADD COLUMN email TEXT;

Note:

Before adding a new column, make sure to backup your database to avoid any data loss or corruption.