SQL COLUMN 關鍵字
ALTER COLUMN
ALTER COLUMN 命令用於更改表中列的資料型別。
以下 SQL 將“Employees”表中名為“BirthDate”的列的資料型別更改為 year 型別。
示例
ALTER TABLE Employees
ALTER COLUMN BirthDate year;
DROP COLUMN
The DROP COLUMN command is used to delete a column in an existing table. (DROP COLUMN 命令用於刪除現有表中的列。)
The following SQL deletes the "ContactName" column from the "Customers" table (以下 SQL 語句從 "Customers" 表中刪除 "ContactName" 列)
示例
ALTER TABLE Customers
DROP COLUMN ContactName;