Wednesday, February 12, 2014

Delete a table data using JOINS in SQL Server

Here is how we can delete using JOINS. I have used inner join here.

DELETE
Table1
FROM
Table1 INNER JOIN Table2
ON Table1.Field2 = Table2.Field2
WHERE -- YOUR WHERE CONDITIONS
Table2.Field3 IS NOT NULL


Hope this helps

No comments:

Post a Comment