--创建临时表

with 临时表名 as

(

--整合查询(两个查询结果合并)

--比如把父级和对应的子级查出

select * from a where a.id =3

union

select * from a where  a.kid = 3

)

--查询统计零时表

select Sum(Famount) from 临时表名

相关文章:

  • 2021-06-27
  • 2021-09-23
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
  • 2021-09-14
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-26
  • 2021-10-02
  • 2021-11-18
  • 2021-07-21
  • 2021-04-22
  • 2022-12-23
相关资源
相似解决方案