Sub Query Update

Sub Query Update:
if you want to run update query in join or by comparing other table then here is the example.
UPDATE Table1
SET Price = Price * 2
WHERE ProductID IN
(SELECT ID
FROM Table2
WHERE ID= 51);
GO
Here is an equivalent UPDATE statement using a join:
USE [...]

SQL Subquery

SQL Subquery
Subquery or Inner query or Nested query is a query in a query. A subquery is usually added in the WHERE Clause of the sql statement. Most of the time, a subquery is used when you know how to search for a value using a SELECT statement, but do not know the exact value.
Subqueries [...]