DEF12=~的时候是creationtime的时间,否则还是原来的时间。两列拼成一个新的列。
IF(DEF12="~",CREATIONTIME所在单元格,DEF12)
decode(def12,'~',CREATIONTIME,def12)
select DEF12 from 表名
union
select CREATIONTIME from 表名
建议学习一下case when判断。
https://www.cnblogs.com/ichenhao/p/8383866.html
select case when def12='~' then creationtime else def12 end as newtime from 表名