Can I unite 2 selects?

From: "Sterpu Victor" <victor(at)caido(dot)ro>
To: "PostgreSQL General" <pgsql-general(at)postgresql(dot)org>
Subject: Can I unite 2 selects?
Date: 2015-01-29 18:58:23
Message-ID: emdacd9d4e-9cbc-4ceb-a690-697451dece68@victor-pc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello

Can I write a query where I receive a single result set from many
queries?
Something like this: SELECT (SELECT 1 AS t1, 2 AS t2), (SELECT 3 AS t3)
I tried exactly this but the error is: "ERROR: subquery must return
only one column"
But I don't see why it must have only one column.

Thank you

---
This email has been checked for viruses by Avast antivirus software.
http://www.avast.com

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2015-01-29 19:09:31 Re: Can I unite 2 selects?
Previous Message Steve Atkins 2015-01-29 18:41:58 Re: 4B row limit for CLOB tables