select 中-nvl(国,0) from ( select sal as 中 ,comm as 国 from emp) t;
测试了下,好像没问题哦 ------解决方案-------------------- 直接用原来列名不就得了,非要用别名? ------解决方案-------------------- select w2_month as x,w2_week as y,x-y as z from table
这个会被当做单独列来处理
不知道这样子和需求相符合吗?
hr@ORCL> create table t1 (id1 number,id2 number);
Table created.
hr@ORCL> insert into t1 values(1,2);
1 row created.
hr@ORCL> commit;
Commit complete.
hr@ORCL> with a as (select id1 x,id2 y,id1-id2 as z from t1)
2 select x,y,z from a;