sql server - Is there a ternary operator in T-Sql? -
or alternatives implement next query:
select * table isexternal = @type = 2 ? 1 : 0`
use case
:
select * table isexternal = case @type when 2 1 else 0 end
or alternatives implement next query:
select * table isexternal = @type = 2 ? 1 : 0`
use case
:
select * table isexternal = case @type when 2 1 else 0 end