不用写成 if @i=1 OR @i=2 OR ... 这么蠢 leftfist 2021-04-26 120 阅读1分钟 原来Transact-SQL可以这样写: \ declare @i int; set @i = 0; if @i in(1,2,3,4) select 'OK'; else select 'oh god'; 结果显示: oh god. 这说明,不用写成 if @i=1 OR @i=2 OR ... 这么蠢。\