1 0n 1 adult cam free - Updating two tables
UPDATE summary_data SET current_category = (SELECT category_id FROM products WHERE products.product_id = summary_data.product_id) WHERE EXISTS (SELECT category_id FROM products WHERE products.product_id = summary_data.product_id); If you want to test your skills using the SQL UPDATE statement, try some of our practice exercises.
These exercises allow you to try out your skills with the UPDATE statement.
ORG_ID = @ORG_ID COMMIT BEGIN TRANSACTION is not the same as BEGIN which starts a block ( used in IF for example).
I often get asked that as it is possible to select two or more tables in a single SELECT statement, is it possible to UPDATE more than one table in a single table.
Well, the question is very valid, but it is truly not possible to do so.
Is it really worth doing all that to avoid writing two statements?
Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Let me know if this solution satisfies the need of updating two tables in a single statement.