当前位置: 代码迷 >> Sql Server >> select IIf(1>2,1,3)为什么错解决方法
  详细解决方案

select IIf(1>2,1,3)为什么错解决方法

热度:320   发布时间:2016-04-27 20:40:48.0
select IIf(1>2,1,3)为什么错
select   IIf(1> 2,1,3)


服务器:   消息   170,级别   15,状态   1,行   1
第   1   行:   '> '   附近有语法错误。

------解决方案--------------------
select (case when 1> 2 then 1 else 3 end)
------解决方案--------------------
iif()是Access的函数,在SQL Server 2000中不支持。
  相关解决方案