Re: Split the result of a query in 2 rows

From: David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Split the result of a query in 2 rows
Date: 2015-03-04 18:46:45
Message-ID: 1425494805753-5840502.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

JORGE MALDONADO wrote
> I have a very simple query to a single table as follows:
>
> SELECT field1, field2 FROM tbl_table ORDER BY field1
>
> Is it possible to "split" the results so field1 is displayed in one row
> and
> field2 in another row?
>
> Best regards,
> Jorge Maldonado

See "UNION ALL"

David J.

--
View this message in context: http://postgresql.nabble.com/Split-the-result-of-a-query-in-2-rows-tp5840497p5840502.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Yaser Raja 2015-03-04 18:49:57 Re: Split the result of a query in 2 rows
Previous Message JORGE MALDONADO 2015-03-04 18:28:25 Split the result of a query in 2 rows