Is it be possible to update two tables writing a single query?
So that i do not have to execute two queries and to track whether both are successful?
Is it be possible to update two tables writing a single query?
So that i do not have to execute two queries and to track whether both are successful?
No, that is not possible AFAIK.
EDIT: What is the reason for you to achieve this in a single query?
You can't do it in a query but you can do it as a transaction when all queries within the transaction will either succeed or fail.
You can write a stored procedure that updates the two tables and returns whatever you need it to in order to determine success. This stored proc can then be called from a single command. However, it will still have to contain two queries.
You could use transactions, however you are still required to update the tables separately and check the results before committing or rolling back.