Re: DELETE WHERE EXISTS unexpected results

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: DELETE WHERE EXISTS unexpected results
Дата
Msg-id [email protected]
обсуждение исходный текст
Ответ на DELETE WHERE EXISTS unexpected results  (Jeff Bland <[email protected]>)
Список pgsql-sql
On 2010-11-30, Jeff Bland <[email protected]> wrote:
> This is a multipart message in MIME format.
> --=_alternative 007A6509852577EB_=
> Content-Type: text/plain; charset="US-ASCII"
>
> I want to delete certain rows from table USER_TBL. 
> Two tables are involved.  USER_TBL and OWNER_TBL. 

delete ... using  was invented for this purpose.

> In the end I expect the USER_TBL to  not contain the 3  HOME  entries. 
> But what is happening is the whole USER_TBL is empty after the query. 

your subselect is being effected by the table used in the delete.

-- 
⚂⚃ 100% natural


В списке pgsql-sql по дате отправления: