的种操作.docVIP

  • 5
  • 0
  • 约6.82千字
  • 约 16页
  • 2016-11-29 发布于北京
  • 举报
的种操作

Alter table 的13种操作 增加/删除 字段 增加/删除 主索引 删除 普通索引 增加/删除 候选索引 增加/删除 有效性规则 增加/删除 默认值 建立永久联系 字段的默认值设置为null 1)增加/删除 字段 Alter table student add 籍贯 c(30) Alter table student drop 籍贯 2) 增加/删除 主索引 Alter table student alter 学号 c(4) primary key Alter table student alter 学号 c(4) drop primary key Close database 先建立一个普通索引 Use student Index on 姓名 tag xm 3)删除 普通索引 Alter table student drop foreign key tag xm 4)增加/删除 候选索引 Alter table student add unique 姓名 tag xm Alter table student drop unique tag xm 5)增加/删除 有效性规则 Alter table student alter 性别 c(2) check 性别$”男女” error “adfhlkajsd” Alter table student alter 性别

文档评论(0)

1亿VIP精品文档

相关文档