with t1 as (select id,num from t),t2 as (select 0 id, 0 num)select * from t1union allselect * from t2 where (select count(*) from t1)=0
判断如果没有查询到字段,返回select '0' as XA,'0' as XB,..... from dual;