sql server - How to write IF(expr1,expr2,expr3) in mssql -


there if(expr1,expr2,expr3) in sql.

how accomplish in ms sql?

you can use case expression:

case when expr1 expr2 else expr3 end 

by way, syntax isn't sql server specific - works in mysql , other databases.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -