List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:January 17 2003 5:00am
Subject:Re: joins in update/delete
View as plain text  
At 17:00 -0700 1/16/03, Matthew Phillips wrote:
>I am running 3.23 and am new to mysql
>I would like to do something like this:
>delete t1
>from t1, t2
>where t1.col = t2.col
>and ...
>basically deleting every row in t1 that has a matching row in t2.
>4.x has mechanisms to join 2 or more tables in update and delete
>statements, 3.x does not. Without upgrading, what are my options?

None, using just SQL.  You'll have to use a program that selects the
relevant t1.col values, then use them to construct DELETE queries.

>  Would
>these confusing left/right join clauses work with update/delete. If so,
>could I please get a litlle syntax example. Thanks for the help folks.
>Matthew Alan Phillips

joins in update/deleteMatthew Phillips17 Jan
  • Re: joins in update/deletePaul DuBois17 Jan
    • Re: joins in update/deleteRoger Baklund17 Jan