we have a table:
create table emp
now after creating the table, primary key is needed on eno column
1)first alter the eno column to not null (since it is nullable)
alter table emp alter column eno int not null
2)now add primary key
alter table emp add primary key(eno)
If the table column (which column we select for add primary key) have 'null' value (or) duplicate value (repeated) means at the time we can not add the primary key for that column.