Delete statement on join:
Some time you need to delete a table on join.
This example will help you to run delete statement on sql join.
Example:
DELETE table1
FROM table1 t1
JOIN table2 t2 ON t1.IDCOL=t2.IDCOL
This T-SQL is checking TABLE2, If records exists then delete TABLE1. Weather IDCOL is already there in TABLE2 or not?
Filed under: TSQL Delete on join | Tagged: Delete statement on join, MS SQL, MS SQL delete on join, SQL Delete on Join, subquery delete | 1 Comment »









