首页 > 其他 > 详细

表的删除和修改

时间:2018-02-19 21:33:55      阅读:209      评论:0      收藏:0      [点我收藏+]

表的修改操作:

alter table score add type nchar(1) null //为score表新添加一个属性type,属性值为 type nchar(1) null

alter table score alter column type nchar(2) //修改score表的type属性的类型为nchar(2)

alter table score add check (type in (‘选修‘,‘重修‘,‘必修‘)) //为score表的type属性添加一个限定的选项范围

alter table score drop column type//删除score表中的type属性

 

表的删除操作:

drop table student

 

表的删除和修改

原文:https://www.cnblogs.com/Stakes-ds/p/8454446.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!