Skip to content
Advertisement

How can I delete using INNER JOIN with SQL Server?

I want to delete using INNER JOIN in SQL Server 2008.

But I get this error:

Msg 156, Level 15, State 1, Line 15
Incorrect syntax near the keyword ‘INNER’.

My code:

Advertisement

Answer

You need to specify what table you are deleting from. Here is a version with an alias:

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement