Updating using 2 tables with sql Xxxweb cams live
In the example above, Rows with Id (1,2,3) are deleted from table T2 because it matches with Table1 (Id) Column with Inner join.
To simplify syntax, T2 is an alias name for Table2, whose rows we want to update based on matching rows with Table1.
SQL subquery definition: A subquery is a query that is nested inside a SELECT, INSERT, UPDATE, or DELETE statement or inside another subquery.
When a subquery has a reference to a table in the outer query, it is called correlated subquery.
Syntax for Delete with Inner Join To simplify syntax, T2 is an alias name for Table2, whose rows we want to delete based on matching rows with Table1.
On clause specifies columns names to find matching rows between both tables using Inner Join.