alter

UK[??:lt?(r)] US[??lt?]

vt. Change; change; remodel (house); (person) change Old

vi.Change; modify

Third person singular: alters present participle: altering past tense: altered past participle: altered

table

英[?te?bl] 美[?teb?l]

n.Table; table, directory; operating table, workbench, game table; flat floor

vt.Tabulation; shelving; Chimera; put aside

adj.

of table Third person singular: tables Plural: tables Present participle: tabling Past tense: tabled

mysql ALTER TABLE statement syntax

Function:Used to add, modify or delete columns in an existing table.

Syntax: Add column: ALTER TABLE table_name ADD column_name datatype. Drop a column: ALTER TABLE table_name DROP COLUMN column_name. Modify columns: ALTER TABLE table_name ALTER COLUMN column_name datatype.

Note: Some database systems do not allow this method of deleting a column in a database table (DROP COLUMN column_name).

mysql ALTER TABLE statement example

//在表 "Persons" 中添加一個(gè)名為 "Birthday" 的新列
ALTER TABLE Persons ADD Birthday date;
//改變 "Persons" 表中 "Birthday" 列的數(shù)據(jù)類(lèi)型
ALTER TABLE Persons ALTER COLUMN Birthday year;
//刪除 "Person" 表中的 "Birthday" 列
ALTER TABLE Person DROP COLUMN Birthday;