0
点赞
收藏
分享

微信扫一扫

删除主键


删除表中已有的主键约束


(1)有命名


 alter table students drop constraint yy;


(2)无命名


可用 SELECT   *   from   user_cons_columns;


查找表中主键名称得student表中的主键名为SYS_C002715


alter table student drop constraint SYS_C002715; 

 

  or 

 

  alter table ptrs_config drop primary key


 


3、向表中添加主键约束


alter table student add constraint pk_student primary key(studentid);

举报

相关推荐

0 条评论