Manie Verster (3/14/2008)
:P:P Excellent article Jeff, I have a question for you though. Is there a FROM clause for the DELETE statement as well and how can I code that?:w00t:
Manie - there IS a FROM in the Delete statement. Just like update, you can only delete from one table at a time, but that doesn't mean you can't use a join to arrive at the data set to delete.
Syntax looks like this:
DELETE Mytable --this is the table where records are being deleted
FROM
MyTable
inner join MyTable2 on mytable.id=mytable2.ID
WHERE
.....
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?