--add new column
ALTER TABLE "Tablename"
ADD "ColumnName" "datatyepe" "constraints"
--alter table column
ALTER TABLE "TableName"
ALTER COLUMN "ColumnName" "datatype" "constraints"
--drop/remove column from table
ALTER TABLE "TableName"
DROP COLUMN "ColumnName"
ADD "ColumnName" "datatyepe" "constraints"
--alter table column
ALTER COLUMN "ColumnName" "datatype" "constraints"
--drop/remove column from table
DROP COLUMN "ColumnName"
datatype can be any valid datatype of sql and constraints is any like not null, null, primary key etc..
No comments:
Post a Comment