您需要一个案例说明:
select (case when lookup = 8 then 8 else lookup end) as lookup
如果lookup
是字符串,则可能需要:
select (case when lookup = '08' then '08' else lookup end) as lookup
如果lookup
为整数,并且您要将其转换为字符串,则:
select (case when lookup = 8 then to_char(lookup, '00') else to_char(lookup, '00') end) as lookup
但是,这对我来说似乎是多余的。