January 27th, 2004, 12:38 PM
I want to delete records from one table that meet certain criteria from more than one table.
where field.table_1 =....
and field.table_2 = ....
I'm afraid to have "from table_1, table_2" because I don't want to delete anything from table 2, only table 1.
I was successfully able to select all the data I wanted to delete, now I just need to delete them. Is there I way I can modify that successful SELECT table by inserting a line or two?
Thank you so much for your help.
January 27th, 2004, 12:46 PM
Something like this:
DELETE FROM t1
FROM table1 AS t1
INNER JOIN table2 AS t2
ON t1.field1 = t2.field2
AND t1.field3 = ...
Up the Irons
What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
"Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
Down with Sharon Osbourne
"I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo