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.
| Author |
Topic |
|
abcd
Yak Posting Veteran
92 Posts |
Posted - 2009-02-18 : 04:27:56
|
| hi all....i have a table named as 'book_label' having columns [LabelId] ,[CompanyId] ,[DeptId] ,[GroupId] ,[LocationId] ,[VoucherId] ,[YearId] ,[FromDate] ,[ToDate] ,[VoucherSNo1] ,[VoucherSNo2] ,[BookNo] ,[CreatedOn] ,[CreatedBy]How can i apply unique key constraint on BookNo column....DO help... |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-02-18 : 04:31:18
|
| alter table book_label add constraint un_k unique (bookno) |
 |
|
|
abcd
Yak Posting Veteran
92 Posts |
Posted - 2009-02-18 : 04:54:37
|
| thnks bklr...it solved my problem...i did searched some other sites on sql about unique constraint but the syntax was wrong in most of the cases...thanks a lot for your help..:) |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-02-18 : 05:15:06
|
| welcome |
 |
|
|
|
|
|