with s1 as(
select * form t1
where 1=1
order by a desc
),
s2 as(
select * form t2
where 1=1
order by a desc
)
select * from s1
union all
select * from s2
sql 的with as 用法
最新推荐文章于 2024-09-21 14:20:34 发布
本文介绍了一种使用WITH子句进行复杂SQL查询的方法,通过创建临时视图s1和s2,分别从表t1和t2中选择数据并按a字段降序排列,最后将两表数据合并展示。

7085

被折叠的 条评论
为什么被折叠?



