FlipKart Offer

Translate to Tamil

Amazon Best Offer

AliExpress Offers

Online Income

Tuesday, 10 January 2012

SQL IF Condition









IF condition is satisfied and the Boolean expression returnsTRUE, it will executed IF Block Sql statement
IF condtion is not satisfied and the Boolean expression returns FALSE, it will executed ELSE Block Sql Statement query.

Syntax for IF...ELSEIF ( Boolean_expression ) 
BEGIN
Sql Statement Block
END
ELSE 
BEGIN
Sql Statement Block
END



Example


IF (3<2)   SELECT 'Correct'  ELSE   SELECT 'Wrong'










Smilely

Services

© 2014