
alter table student
add scome datetime

alter table student
drop column scome

alter table student
alter column sage tinyint
添加约束

删除约束


alter table course
add constraint ck_creadit check(ccredit>0 and ccredit<=4)
或者
alter table course
add check(ccredit>0 and ccredit<=4)

alter table course
drop constraint ck_credit
或
alter table course
drop ck_credit
删除基本表


本文详细讲解了如何使用ALTER TABLE语句进行表结构的增删改,包括添加COMMENTS、删除列、改变数据类型,并涉及添加和删除约束,如课程表中credit分数的检查。
3972

被折叠的 条评论
为什么被折叠?



