ANY dialect question:
constraint with if-then
Hello,
I was wondering if it is possible to have a constraint check a value before enforcing the constraint..
i.e. I have two columns.. both columns are Y and N values only..
The 'constraint' I would like to add is if column1 = Y then column2 has to be 'Y' while maintaining column1 can be Y or N.
Wondering if this should be a trigger??
Thanks for any help.
|