SQL Server IIF vs CASE

The Solution to SQL Server IIF vs CASE is

IIF is the same as CASE WHEN <Condition> THEN <true part> ELSE <false part> END. The query plan will be the same. It is, perhaps, "syntactical sugar" as initially implemented.

CASE is portable across all SQL platforms whereas IIF is SQL SERVER 2012+ specific.

~ Answered on 2014-04-03 13:39:01

Most Viewed Questions: