Anyone know how this could be done...
I have a table (table1) of name value pairs.
role_id & role_name
I also have a table (table2) of the same columns which is basically a data subset of table 1. I wish to remove all the entries contained in table2 from table 1.
As the primary key is over both colums I don't know how to do this. What I want to do is kind of like..
But obviously that does not work. The DB is mySQL
Cheers for any help
I have a table (table1) of name value pairs.
role_id & role_name
I also have a table (table2) of the same columns which is basically a data subset of table 1. I wish to remove all the entries contained in table2 from table 1.
As the primary key is over both colums I don't know how to do this. What I want to do is kind of like..
DELETE from
table1
WHERE
role_id , role value
IN
(SELECT
role_id , role value
FROM
table 2) ;
table1
WHERE
role_id , role value
IN
(SELECT
role_id , role value
FROM
table 2) ;
Cheers for any help



Comment