Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: constraining one correct answer but multiple invalid answers
You could create a function-based index index which has two arguments -
the question and id and the yes/no flag.
This would then return the question id when the when the flag is 'Y'
but NULL otherwise.
Then create a unique function-based index using this function passing in the question id column and the yes/no flag column.
Null entries are not entered into the index and an entry is only made containing the question id when the flag is yes. Received on Thu Jan 04 2007 - 05:24:16 CST