1:
查找主键
describe indexes for table
.
例子:db2 "DESCRIBE INDEXES FOR TABLE Students"
2:删除表主键
alter table . drop primary key
例子:db2 "ALTER TABLE Students DROP PRIMARY KEY"
3:增加表主键
alter table . add CONSTRAINT PRIMARY KEY ()
例子: db2 "ALTER TABLE Students ADD CONSTRAINT StudentsKey PRIMARY KEY(sid)"
阅读(964) | 评论(0) | 转发(0) |