alter table tblname add id integer; create sequence tblname_seq; update tblname set id = tblname_seq.nextval; drop sequence tblname_seq; alter table tblname modify (id serial not null); ALTER TABLE tblname ADD CONSTRAINT PRIMARY KEY (id);
Devamını Oku »