I just discovered that Jet derive from standard SQL. In standard SQL, it makes no sense to specify columns in DELETE query because an entire row get deleted as per the definition of delete query and if only partial deletion of columns' data was desired, a UPDATE query is actually appropriate.
But apparently it is valid to write this in Jet:
Furthermore, if I write this in SQL view:
I can execute the SQL just fine. But I can't view the rows that will be deleted; I get an error saying must have at least one destination field.
What's the deal with this? I'm guessing it has something to do with being able to select/view columns in datasheet view without actually executing the SQL, but this still looks weird and downright confusing.
But apparently it is valid to write this in Jet:
Code:
DELETE * FROM foo;
DELETE a, b, c FROM foo;
Furthermore, if I write this in SQL view:
Code:
DELETE FROM foo;
What's the deal with this? I'm guessing it has something to do with being able to select/view columns in datasheet view without actually executing the SQL, but this still looks weird and downright confusing.