I am attempting to use the DELETE
clause in MS Access and have an issue when also using the JOIN
clause. I have notice this can be accomplished by using the DISTINCTROW
key word.
For example, the following SQL statement does not allow for deletion:
DELETE Table1.*
FROM Table1 INNER JOIN Table2 ON Table1.Name=Table2.Name;
However, this statement does:
DELETE DISTINCTROW Table1.*
FROM Table1 INNER JOIN Table2 ON Table1.Name=Table2.Name;
- Why does the
DELETE
work when using theDISTINCTROW
key word? - More specifically, what is happening in the JET engine to require this?
DELETE
operates on whole rows rather than columns, specifying anything between theDELETE
andFROM
keywords makes no sense. – Phonetics