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)
 unique field & checking at time of inserting ...

Author  Topic 

asifbhura
Posting Yak Master

165 Posts

Posted - 2007-12-04 : 04:45:33
Hi

I want to set username field as unique.so there cant be duplicate username, how to do so ?

at the time inserting record, If the username already exist it must display error.

how can i do so?

regards,
ASIF

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-12-04 : 04:53:25
Add UNIQUE constraint on username field.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page
   

- Advertisement -