Well, if you happen to be using Sql Server you can do that sort of thing in T-Sql. In Oracle, you can also accomplish the same thing using pl/sql. Either way i'd do it in a stored ...
The IF expression is evaluated first. If the expression is true, execution flows through the THEN alternative. If the expression is false, the ELSE statement, if present, is executed. Otherwise, the ...
is a statement executed when expression is false. The IF statement contains an expression to be evaluated, the keyword THEN, and an action to be taken when the result of the evaluation is true. The ...