Can't Create primarykey

  • alter table dept

    add constraint PK_deptno primary key (deptno)

    I am getting this error

    Cannot define PRIMARY KEY constraint on nullable column in table 'dept'.

    any body plz help me

    Thanks & Regards

    subu

  • Alter that column, make it NOT NULL

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply