SQL DELETE JOIN Example
Query to delete library entry for id 1001 using JOIN
Query:
DELETE library_books FROM library_books JOIN students ON students.student_id =library_books.lib_id WHERE lib_id= 1001 SELECT * FROM library_books
Output:
SQL DELETE JOIN
DELETE JOIN in SQL lets you delete rows of a table, based on conditions involving another table. We can use the DELETE statement with the JOIN operation to perform DELETE JOIN.
We use JOIN to combine data from multiple tables., to delete the same rows or related rows from the table at that time we use delete join.
In this article let us see how to delete multiple data using DELETE using JOIN by using MSSQL as a server.
Contact Us