登录
上传中....
T-SQL 中是否有三元条件运算符?
实现以下查询的替代方法有哪些:
What are alternatives to implement the following query:
select * from table where isExternal = @type = 2 ? 1 : 0
使用case:
select * from table where isExternal = case @type when 2 then 1 else 0 end