http://stackoverflow.com/questions/1382842/mysql-insert-joins
INSERT INTO tableNew (col1, col2)
SELECT tbl1.col1, tbl2.col2
FROM tbl1 JOIN tbl2
DELETE users, comments
FROM users JOIN comments ON comments.author=users.id
WHERE users.isspammer=1
Update C
Join tableB B on B.id=C.bid
Join tableA A on A.id=B.aid
Set C.status='Active',
A.status='Active'
Where A.id=1 or A.id=2 or A.id=3