From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Deepak Malhotra <deepakjm(at)yahoo(dot)com> |
Cc: | <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Hello Testing |
Date: | 2003-08-16 21:25:41 |
Message-ID: | 20030816142029.K67239-100000@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
On Sat, 16 Aug 2003, [iso-8859-1] Deepak Malhotra wrote:
> Hello
>
> Any idea why I am getting
> "ERROR: More than one tuple returned by a subselect
> used as an expression"
> while running update statement using subselect
> statement.
That usually means you're using a subselect that returns
multiple rows in a context where a scalar is expected,
for example
update foo set bar = (select abc from def);
works if def has 0 rows (giving a NULL) or 1 row (giving a value),
but if the subselect returned say 3 rows, which gets used to
update each row from foo?
From | Date | Subject | |
---|---|---|---|
Next Message | Gaetano Mendola | 2003-08-17 22:33:24 | REINDEX or DROP and CREATE ? |
Previous Message | Deepak Malhotra | 2003-08-16 20:55:08 | Hello Testing |