Lets assume we have a scenario where we have to update a value in one table based on the value in another table then we can use the following:
In General we can say:
UPDATE TABLE_1 INNER JOIN TABLE_2 ON TABLE_1.COLUMN_1= TABLE_2.COLUMN_2 SET TABLE_1.COLUMN = EXPR WHERE TABLE_2.COLUMN2 = EXPR
for a particular example:
UPDATE aspnet_users au INNER JOIN aspnet_usersinroles uir ON au.username = uir.username SET email='a' WHERE uir.rolename ='Administrator'
Hope this may help anyone


