DELETE abc
FROM abc INNER JOIN xyz ON
abc.RECORD_TYPE = xyz.RECORD_TYPE AND
abc.IN = xyz.IN
OPTION (MERGE JOIN, LOOP JOIN)
can anyone tell me what exactly the query doing ?
DELETE abc
FROM abc INNER JOIN xyz ON
abc.RECORD_TYPE = xyz.RECORD_TYPE AND
abc.IN = xyz.IN
OPTION (MERGE JOIN, LOOP JOIN)
can anyone tell me what exactly the query doing ?
This DELETE
all the records from the table abc
with JOIN
to another table. It deletes all the records in the table abc
that has a RECORD_TYPE
value equal to the RECORD_TYPE
in the other table AND in the same time the value IN
are equals in the two table.
It is a normal DELETE
clause, Where the FROM
can contain extra joined table as specified by the documentation:
FROM clause:
This extension, specifying a join, can be used instead of a subquery in the WHERE clause to identify rows to be removed.