List:General Discussion« Previous MessageNext Message »
From:Thimble Smith Date:March 16 1999 12:48am
Subject:Re: returning table name
View as plain text  
On Mon, Mar 15, 1999 at 07:23:02PM -0500, efrazier@stripped wrote:
> DELETE  books.*, fbooks.*, sbooks.*
> FROM books,fbooks, sbooks 
> WHERE books.index=fbooks.index
> AND
> books.index =3;

Nope, you can only delete from one table at a time.  You can't
reference other tables (do joins) even if you're only trying to
delete from one table.  Once MySQL has sub-selects, the desire
to do that will go away (for now join the ids together in a
comma-separated string and delete WHERE id IN (ids-string)).

But for you, just do three separate deletes.  If you don't like
it, you'll probably have to use something other than SQL.  :)

Tim
Thread
File access problemtymiwi14 Mar
  • File access problemMichael Widenius15 Mar
  • Re: File access problemVan15 Mar
    • returning table nameMarc Antony Vose15 Mar
      • returning table namesinisa16 Mar
        • Re: returning table nameThimble Smith16 Mar
Re: File access problemMikael Willberg15 Mar
Re: returning table nameefrazier16 Mar
  • Re: returning table nameThimble Smith16 Mar