0
我想从我的表offer
中选择数据,其中有一个字段名为type
,我需要对每种类型应用不同的条件。SQL Server根据不同字段值的条件,选择不同的字段值
代码可能是这样的:
select * from offer where
if type = 1 then apply condition_1,
else if type = 2 then apply condition_2 and condition_3,
else if type = 3 then apply condition_4,
所以,我怎么能做到这一点?
这将有助于如果你能发布什么样的条件.. –