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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2000-05-23 23:32:32 Re: two fields in subselect
Previous Message Steffers 2000-05-23 21:16:01 Functions and Variables.