9

Sql delete entries

view full story
linux-howto

http://www.linuxquestions.org – Hi All, I was trying to delete all entries from a table whose corresponding id number entries are not found in a associated different table. If I want to display all entries of a table1 (using id_number) which are not present in the other table I used this and it worked perfectly. SELECT * from table1 WHERE id_number NOT IN (SELECT id_number FROM TABLE2) However when I use the delete command it doesn't work DELETE * from table1 WHERE id_number NOT IN (SELECT id_number FROM TABLE2) Please could some one correct where am I doing wrong? Thanks (HowTos)