select
(
case
when o.class_id='10' then (select m.busi_id from pd_busi_instance_inter m where m.oss_busi_id=#ossBusiId#)
else (select i.busi_id from pd_busi_instance_info i where i.oss_busi_id=#ossBusiId#)
end
)
from or_req_info o where req_id=#reqId#
SQL的case when语句
最新推荐文章于 2024-06-29 15:12:22 发布