Oracle 如何在where子句中加入case when

it2022-05-05  128

select a.*,a.rowid from sys_order a where 1=1 and (case when a.order_type in ('01', '02') then a.phone_num else a.staff_phone end)= '123456789'

 


最新回复(0)