Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Two-field unique constraint
I wonder if there is a way to make a constraint on a table so that the combination of two fields has to be unique but not forcing each field by itself to be unique?
example:
Ive got a table WORDS with field WORD_ID,CATEGORY_ID and WORDTEXT. WORD_ID is a primary key. CATEGORY_ID is a foreign key and WORD_TEXT is just the text of the word. I wonder if there is a way to make a contraint so that there cant be two(or more) WORD_ID's with the same CATEGORY_ID and WORD_TEXT.
/Kalle
Got questions? Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com
Received on Sat Jul 22 2000 - 00:00:00 CDT
![]() |
![]() |