Subqueries in Non-SELECT Queries
От | Frank Joerdens |
---|---|
Тема | Subqueries in Non-SELECT Queries |
Дата | |
Msg-id | 3A3CFFF9.3615E576@joerdens.de обсуждение исходный текст |
Ответы |
Re: Subqueries in Non-SELECT Queries
Re: Subqueries in Non-SELECT Queries |
Список | pgsql-sql |
I am trying to do something that looks to me exactly like what's described in chapter 8.4 in the Postgresql book: test=> UPDATE salesorder test-> SET ship_date = '11/16/96' test-> WHERE customer_id = ( test(> SELECT customer_id test(> FROM customer test(> WHERE name = 'Fleer Gearworks, Inc.' test(> ); UPDATE 1 Here only one row is updated. This should work with more than one, right? I get an error which suggests that it doesn't: mpi=# update index set level = 2 where parentid = ( select id from index where level = 1 ); ERROR: More than one tuple returned by a subselect used as an expression. mpi=# This is a recursive query, on a single table. Is that not possible? I am using 7.1. - Frank
В списке pgsql-sql по дате отправления: