I have two tables x and y contains two columns each say (email and password) in my database.
I am not able understand how to update password in a table using where (email=...) clause so that if email belongs to x table then it's password get updated or if email belongs to y table then it's password get updated.
I tried in this way where the given email belongs to x table so that first query executed .
UPDATE x SET password="qas" where email="adsf@gmail.com";
UPDATE y SET password="qas" where email="adsf@gmail.com";
I am able to update separate (two) queries but i want single query which checks email in both tables and get password updated.