Avoiding repetition without creating a view
-
31-10-2019 - |
题
Suppose that I have a query Q1 and I need to run a query like the following:
Q1
union
select *
from (some query that uses Q1 outcome)
I would like to do that:
- Without creating any view
- Without running twice the Q1 query.
How can I do that on PostgreSQL?
没有正确的解决方案
不隶属于 dba.stackexchange