| SQL - Questions and Answers Have a SQL question? Post it here. First do a search to see if someone hasn't already answered it. |
|
|||
constraint with if-thenHello,
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. |