sql 例子
with temp_1 as
(
select * from a
),
temp_2 as(
select * from b
)
select * from a
left join b on a.id=b.id
能否解析成
with temp_1 as
(
select * from a
),
temp_2 as(
select * from b
)
select *
from (
select TMP_PAGE.*, ROWNUM as ROW_ID
from (
select * from a
left join b on a.id=b.id
) TMP_PAGE
where ROWNUM <= 100
)
where ROW_ID > 50
当前解析后结果如下:
select *
from (
select TMP_PAGE.*, ROWNUM as ROW_ID
from (
with temp_1 as
(
select * from a
),
temp_2 as(
select * from b
)
select * from a
left join b on a.id=b.id
) TMP_PAGE
where ROWNUM <= 100
)
where ROW_ID > 50