Re: Delete from Join

From: Gwyneth Morrison <gwynethm(at)toadware(dot)ca>
To: Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Delete from Join
Date: 2008-07-03 12:26:52
Message-ID: 486CC58C.1090604@toadware.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Scott Marlowe wrote:
> Take a look here, in the notes section:
>
> http://www.postgresql.org/docs/8.3/interactive/sql-delete.html
>
> on the using keyword.
>
>
Thank you for your reply Scott,

I guess this is where the confusion started for me.

It says here in your reference that the using clause is not standard but
that is fine as I am doing a subst. MS actually allows:

DELETE from table from table.....

I change the second from to a using and it works fine most of the time.

What I am actually trying to get past is:

DELETE FROM data_table1
using data_table2 INNER JOIN
data_table1 ON data_table1.fkey =
data_table2.pkey;

Where the INNER JOIN keyword is used in the delete.

In the documentation section you cited, they refer to the from clause
in the usinglist. The from clause link there refers to select which states
that a join keyword is valid in a from clause.

What I have found is it sometimes compiles but doesn't work.

I am just seeking verification if it is supposed to work.

Gwyneth

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sam Mason 2008-07-03 13:19:49 Re: Functional index adding one
Previous Message lbarcala 2008-07-03 11:05:06 Full text index without accents