单个临时表语法格式:with tmp as (select * from tb_name)
多个临时表的语法:
with
tmp as (select * from tb_name),
tmp2 as (select * from tb_name2),
tmp3 as (select * from tb_name3)
作用:
(1)SQL可读性增强,更有层次感。
(2)with子查询只执行一次,将结果存储在用户临时表空间中,可以引用多次,增强性能。
(3)将几个临时表建立关联
例子:
标签:name,临时,用法,语法,tb,select From: https://www.cnblogs.com/max1995/p/16709012.html