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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 How can we have UNIQUE constraint to the Table...

Author  Topic 

ganeshkumar08
Posting Yak Master

187 Posts

Posted - 2008-05-19 : 01:50:54
Hello...
I was confused with UNIQUE key. Its easy to create PRIMARY KEY to the Table. Now how to alter the Table to have UNIQUE key...

Thanks
Ganesh

Solutions are easy. Understanding the problem, now, that's the hard part

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2008-05-19 : 01:52:09
Your primary key will be unique, so therefore it is already a unique key.
Go to Top of Page

ganeshkumar08
Posting Yak Master

187 Posts

Posted - 2008-05-19 : 02:19:13
I need only unique key constraint instead of PK, how can we achieve it...
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-05-19 : 02:21:20
quote:
Originally posted by ganeshkumar08

I need only unique key constraint instead of PK, how can we achieve it...


Use ALTER TABLE ADD CONSTRAINT statement
Go to Top of Page
   

- Advertisement -