Alter
a description of sql alter Statement
ALTER TABLE ADD
syntax
ALTER TABLE TableName
ADD NewCollumName DataType;Example
ALTER TABLE customer
ADD Email varchar(255);adds a collum Email to table customer
ALTER TABLE DROP COLLOM
syntax
ALTER TABLE tableName
DROP COLUMN CollumnName;removes a collumn from a table
Example
ALTER TABLE customers
DROP COLUMN email;removes column from table
ALTER RENAME COLUMN
syntax
ALTER TABLE TableName
RENAME COLUMN OldName TO NewNameALTER COLUMN Datatype
syntax
ALTER TABLE TableName
ALTER COLUMN ColumnName DataType;the datatype speseficy what we would like to be stored in a collums fields for available Datatype check datatype page
Last updated