I am writing a long and complicated stored procedure. Basically it is like
"if A is true, then
SELECT blabla FROM bla WHERE (B = true)
otherwise,
SELECT blabla FROM bla WHERE (B = false)"
I don't want to write CASE WHEN; and I don't want to repeat the common SELECT stuff. So this is what I do:
"SELECT blabla FROM bla WHERE (A = false OR B = true)"
This is because "if X then Y" is logically equivalent to "not X or Y".
I really liked your Information. Keep up the good work. Driving School Rhodes
ReplyDelete