Skip site navigation (1) Skip section navigation (2)

two fields in subselect

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org>
Subject: two fields in subselect
Date: 2000-05-23 22:53:48
Message-ID: 392B0BFC.BB2CD23B@selectacast.net (view raw or flat)
Thread:
Lists: pgsql-sql
I want to do this:

SELECT a, (select x,y,z from table2 where table1.a = table2.w), b, c
from table1;

But postgres complains:

ERROR:  Subselect must have only one field


How can I get around this?


Responses

pgsql-sql by date

Next:From: Tom LaneDate: 2000-05-23 23:32:32
Subject: Re: two fields in subselect
Previous:From: SteffersDate: 2000-05-23 21:16:01
Subject: Functions and Variables.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group