oracle給已有表添加主鍵 怎么給oracle給表增加一個主鍵?
怎么給oracle給表增加一個主鍵?相關(guān)SQL請參考:1。創(chuàng)建表時,指定表的主鍵create table tmp(id int primary key not null,name VARCHAR2(2
怎么給oracle給表增加一個主鍵?
相關(guān)SQL請參考:1。創(chuàng)建表時,指定表的主鍵
create table tmp(id int primary key not null,name VARCHAR2(20))
2。通過SQL在原表中添加主鍵
alter table tmp Add constraint PKid primary key(id)