MySQL Forums
Forum List  »  Newbie

How to delete these records?
Posted by: p.durbar
Date: August 23, 2005 05:30AM

I have a SQL statement as follows:

select * FROM item left join channels on item.cid = channels.id where channels.id is null

(had to use this as it appears that 'NOT IN...' does not work on my providers version of MySQL)

This works fine and selects the correct records but i dont want to select 'em, i want to delete them but i've tried things like

Delete FROM item left join channels on item.cid = channels.id where channels.id is null

But this throws an error, how do i arrange the statement so it deletes those records?

Thanks

Options: ReplyQuote


Subject
Written By
Posted
How to delete these records?
August 23, 2005 05:30AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.