快得多
with tbl as
(
select
id,name
from
a
)
select id from tbl;
create table tbl
as
select
id,name
from
a;
select id from tbl; with tbl as
(
select
id,name
from
a
)
select id from tbl;
select name from tbl;发布于 2020-01-18 03:14:01
with tbl as是一个常见的表表达式,也称为CTE,它只能在单个查询中访问。因此,我们不能在多个由;分隔的SQL查询中使用CTE。create temporary table表而不是create table。前者在单个会话中可见,并将在会话结束时消失。https://stackoverflow.com/questions/59733576
复制相似问题