Delete from a table with JOIN

Поиск
Список
Период
Сортировка
От Noel
Тема Delete from a table with JOIN
Дата
Msg-id 400240BA.50505@med.monash.edu.au
обсуждение исходный текст
Ответы Re: Delete from a table with JOIN  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Hi,

I'm trying to delete from a table based on a foreign key from another table.
I've tried this:
DELETE FROM a
FROM a LEFT JOIN b
ON a.b = b.id
WHERE b.foo = 100

Also tried with the second FROM dropped.
All I get is a parse error:
parser: parse error at or near "JOIN" at character 11, just after first
FROM a.

Any suggestions would be appreciated
Cheers

--
Noel Faux
Department of Biochemistry and Molecular Biology
Monash University
Clayton 3168
Victoria
Australia



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

Предыдущее
От: Russell Shaw
Дата:
Сообщение: Cluster in users home
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Delete from a table with JOIN