Saturday, 15 March 2014

mysql - deleteing matching values from table1 when found in table2 -



mysql - deleteing matching values from table1 when found in table2 -

i newbie , cannot write subquery.i have 2 table 1 csv , other master.i want delete records csv values nowadays in master.

my csv table

id(pk) phone 1 1234 2 2345 3 7777

my master table

urn phone 1 9988 2 1234 3 7777

to find values nowadays in csv , master query.

select phone csv phone in (select phone master) phone 1234 7777

now how can delete matching values csv in single query php?

basically, can replace select delete from:

delete csv phone in (select phone master);

mysql

No comments:

Post a Comment