使用with的好处:可以当作一个表重复使用
注:最后一个as不加逗号。
with
t1 as
(
select * from table1
),
t2 as
(
select * from table2
),
t3 as
(
select * from table3
)
select * from t1 a, t2 b, t3 c
使用with的好处:可以当作一个表重复使用
注:最后一个as不加逗号。
with
t1 as
(
select * from table1
),
t2 as
(
select * from table2
),
t3 as
(
select * from table3
)
select * from t1 a, t2 b, t3 c