Skip site navigation (1) Skip section navigation (2)


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: felix(at)crowfix(dot)com
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: DELETE with JOIN
Date: 2008-08-07 19:58:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
felix(at)crowfix(dot)com writes:
> I have tried to do this before and always found a way, usually

>     DELETE FROM a WHERE a.b_id IN (SELECT id FROM b WHERE second_id = ?)

> but I have too many rows, millions, in the IN crowd, ha ha, and it
> barfs.

Define "barfs".  That seems like the standard way to do it, and it
should work.

			regards, tom lane

In response to


pgsql-sql by date

Next:From: Frank BaxDate: 2008-08-07 20:01:29
Subject: Re: DELETE with JOIN
Previous:From: felixDate: 2008-08-07 19:12:07
Subject: Re: DELETE with JOIN

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group