--Date格式化片段 to_char(create_date,'YYYYMMDD') as date --格式化系统当前日期 select to_char(sysdate,'YYYYMMDD') from dual; --Select时Case片段 select case when item_a like 'A%' and item_b = 'b' then 'one' when item_a like 'A%' and item_b = 'B' then 'two' else 'other' end as type from table_name