Conditional if in sql server (IIF)

IIF() is one of the new built-in logical function introduced as Sql Server 2012.

Syntax:
IIF ( boolean_expression, true_value, false_value )
Example: 
Comparing two Integer numbers
SELECT IIF(10 > 5, 'TRUE', 'FALSE' )

Post a Comment

0 Comments