Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sql primary key problem

Author  Topic 

jojo13
Starting Member

3 Posts

Posted - 2007-12-31 : 13:09:12
Hi
I made a new table and I cannot set primary key(it is disable).
I don't know what to do to set the primary key(except write by clicking it doesn't work as I said). Any helps will be appritiated.
Thanks

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2007-12-31 : 13:27:17
ALTER TABLE tablename ADD PRIMARY KEY (colname(s))
but make sure that col(s) reffered here is/are of NOT NULL type.
Go to Top of Page

jojo13
Starting Member

3 Posts

Posted - 2007-12-31 : 13:44:22
Thanks visakh16
Go to Top of Page
   

- Advertisement -