Re: subquery with more than one column - Mailing list pgsql-novice

From Raimon Fernandez
Subject Re: subquery with more than one column
Date
Msg-id 989D18C1-AF52-4AFE-8581-2B988B457DA4@montx.com
Whole thread Raw
In response to Re: subquery with more than one column  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: subquery with more than one column
List pgsql-novice
but I want as a separate columns, like a normal SELECT ...


this is what I get:

+---------------+
| row           |
+---------------+
| (1,"ref rai") |
| (1,ref)       |
+---------------+


thanks,


raimon


On 05/07/2007, at 21:30, Tom Lane wrote:

> Raimon Fernandez <coder@montx.com> writes:
>> It's not possible to return in a subquery more than one column ?
>
> Try it like this:
>
>   SELECT id_intern, (SELECT ROW(referencia, descripcio) FROM
> articles WHERE...
>
>             regards, tom lane
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org
>



pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: Postgres not using indices defined on my table with certain queries using "in"
Next
From: Jon Sime
Date:
Subject: Re: subquery with more than one column