with Frt as (
select empno as emid ,
e.ename as ename1,
e.job as job1 ,
e.sal as sal1,
e.deptno as deptno1
from emp e join bonus b
on e.job = b.job
),
Snd
as ( select emid as emid2,
ename1 as ename2,
job1 as job2,
loc as loc2
from Frt join dept d
on Frt.deptno1 = d.deptno
)
select * from Snd
报表用 with as 建临时表
最新推荐文章于 2024-09-12 06:46:38 发布