Quick mysql db question for the experts out there. I have two mysql tabes: Table1 ID username Table2 ID username email How can I find all the records that have a certain "email" address in table 2 and then delete those records from both table 1 and table 2?
I will write the sql, but you will have to debug and get it working. First call the following SQL ==================== delete from table1 where id in (select id from table2 where email = 'name@yordomain.com') Then call this ========== delete from table2 where email = 'name@yordomain.com
do you know if you renamed it like that Table1 Table1_ID Table1_username Table2 Table2_ID Table2_username Table2_email beause of if you want to make it in one query
do you know if you renamed it like that Table1 Table1_ID Table1_username Table2 Table2_ID Table2_username Table2_email beause of if you want to make it in one query