Hello Testing
Hello Testing
От:
Deepak Malhotra <deepakjm@yahoo.com>
Дата:
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. ===== Deepak Malhotra Phoenix, AZ deepakjm@yahoo.com ________________________________________________________________________ Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/
Re: Hello Testing
От:
Stephan Szabo <sszabo@megazone.bigpanda.com>
Дата:
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?