Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想做这样的事情。
declare @var1 as integer Select * from table name where id If @var1 = 1 then 21 elseif @var1 = 2 <>21
我只想知道这是否可能。唯一需要改变的是比较运算符。
where ( @var1 = 1 and id = 21) or (@var1 = 2 and id <> 21)