MySQL Conditional IF Statement

October 21st, 2011 by Regaz

The MySQL IF Conditional Statement take this General form:

IF (booleanValue, valueReturnedIfTrue, valueReturnedIfFalse)

For booleanValue we Intend every Boolean Value then for Example the Result of a Comparison Statement like: A > B.
The IF MySQL Statement leave your Free to Assign the Value Returned in case of Truth or Untruth. So for Example you can rightly Inverse the Conventional Result giving:

IF (booleanValue, False, True)

This Function will Return False if booleanValue = True and Vice-Versa.

(Visited 1 times, 1 visits today)

Tags: