example:
we have a table:
create table emp
(eno int,
ename varchar(10))
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)
Note:
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.