Hello
i have execute the following query on sql editor
create database Employee
use Employee
create table Emp
(
id integer,
E_Name nvarchar (20),
e_Add nvarchar(50)
)
select * from Emp
insert into Emp values('001','Reshma','BBSr')
so i want to add a primary key on existing table Emp
i have write the following query on sql editor
alter table Emp add constraint pk_Emp primary key(id)
but after execute the of the above query
the following error will be raised
Msg 8111, Level 16, State 1, Line 1
Cannot define PRIMARY KEY constraint on nullable column in table 'Emp'.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint. See previous errors.
So how it can possible please suggest me ASAP