■列の追加
ALTER TABLE [TableName] ADD
COLUMN [ColName] INT;
■列の削除
ALTER TABLE [TableName] DROP
COLUMN;
■ディフォルト値のセット、解除
ALTER TABLE [TableName] ALTER
COLUMN [ColName] SET DEFAULT 1;
ALTER TABLE [TableName] ALTER
COLUMN [ColName] DROP DEFAULT;
■NOT NULLの設定
ALTER TABLE [TableName] ALTER
COLUMN [ColName] SET NOT NULL;
■列名の変更
ALTER TABLE [TableName] RENAME
COLUMN [ColName1] TO [ColName2];
■テーブル名の変更
ALTER TABLE [TableName1] RENAME
TO [TableName2];
■参照整合性の追加・削除
追加
ALTER TABLE [TableName1] ADD
CONSTRAINT [ConstraintName] FOREIGN KEY([ColName1])
REFERENCES [TableName2]([ColName1]);
削除
ALTER TABLE [TableName1] DROP
CONSTRAINT [ConstraintName];