Sunday, 11 August 2013

SQL check with an if statement

SQL check with an if statement

quick question on SQL how can I make a check such as:
Alter Table Invoices WITH NOCHECK
ADD CHECK
Now this is the part where I want to add a check so that the column
PaymentDate can be null if another column Payment Total is equal to 0 and
alo that PaymentDate is not null if Payment Total is greater than 0.
Thanks for any help!

No comments:

Post a Comment