New function in SQL SERVER DENALI (IIF)
Hello friends,
As a continuation of Denali exploration series
I would like to share some new functions also here. I am sure you like shorthand function “IIF”. Denali now providing IIF function so Instead of writing CASE statement you can easily use IIF function.
Its syntax is same as we doing in our other programming language.
IIF (Condition, true value, false value)
Example:-
DECLARE @genderMale AS BIT
SET @genderMale = 1 -- where SELECT IIF (@genderMale = 1,’ Smart’, ‘Beautiful’) as property
I hope you will use it soon.
Happy Holidays!!!!
Thanks
Rajat Jaiswal
Advertisement
Categories: DENALI, Sql server
DENALI, Rajat Jaiswal, Sqlserver

