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: (view raw, whole thread or download thread mbox)
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?


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-2017 The PostgreSQL Global Development Group