The correct command to add a column to a table in SQL is 'ALTER TABLE'.

Syntax:

ALTER TABLE table_name
ADD column_name data_type;

Example:

ALTER TABLE customers
ADD email VARCHAR(255);

This command will add a new column named 'email' with a VARCHAR data type and a maximum length of 255 characters to the 'customers' table.

How to Add a Column to a Table in SQL

原文地址: https://www.cveoy.top/t/topic/oCx7 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录