在某次汇总时需要得到0-100岁的某个数据集,作为left join语句的左侧,简单的做法是
select '0岁' age from dual union all select '1岁' age from dual union all ...
得到所有想要的数据集 用connect by子句能简化这一步骤
select level||'岁' r from dual connect by level
select '0岁' age from dual union all select '1岁' age from dual union all ...
得到所有想要的数据集 用connect by子句能简化这一步骤
select level||'岁' r from dual connect by level