Question : Join in a Delete Query

Is it possible to have a join in a delete query.  Lets say i have a select statement that looks like this, is it possible to delete from the tblTemp table using a similar join, at the moment i am using sub queries to do the job but its not great!

SELECT * FROM tblTEMP
LEFT JOIN tblJobs
ON tblTEMP.UniID = tblJobs.uniID
WHERE JobID = @JobID

Answer : Join in a Delete Query

Try this:

DELETE tbltemp
FROM tbltemp
LEFT JOIN tblJobs
ON tblTEMP.UniID = tblJobs.uniID
WHERE JobID = @JobID
Random Solutions  
 
programming4us programming4us