Hi,
We are using MS SQL 2008 R2. I have a table and I would like to put a primary key or composite key for 3 fields. I have VendorID,ConsumeDate and ConsumedItemId fields that I restrict to enter the same data. Lets say, If I have a record like VendorID = 1, ConsumedDate = 2011-02-24 and ConsumedItemID = 1, I dont want the same data is entered to the table. How can I do it?
Thanks in Advance.
Best Regards.
We are using MS SQL 2008 R2. I have a table and I would like to put a primary key or composite key for 3 fields. I have VendorID,ConsumeDate and ConsumedItemId fields that I restrict to enter the same data. Lets say, If I have a record like VendorID = 1, ConsumedDate = 2011-02-24 and ConsumedItemID = 1, I dont want the same data is entered to the table. How can I do it?
Thanks in Advance.
Best Regards.