0

In standard SQL definitions, DML is defined as CRUD-operations:

  • SELECT
  • INSERT
  • UPDATE
  • DELETE
  • Call, explain, merge, etc...

Within DML, is there a further distinction between what might be the 'query' (retrieving information) and what might be 'modification' (modifying information) ? For example, something like:

DQL (query)

  • SELECT

DWL (write)

  • INSERT, UPDATE, DELETE

Or does no such distinction exist and people just use the terms 'read' and 'write' ? Another good reference is: What are DDL and DML?.

David542
  • 104,438
  • 178
  • 489
  • 842
  • All four DML statements are "queries" that work on the data. DDL statements on the other side are considered separate since they perform structural changes to the database. – The Impaler Oct 17 '20 at 23:39
  • Sometimes, I've seen `SELECT` considered as separate since it returns a "result set". `INSERT`, `UPDATE`, and `DELETE` are considered "update operations" and they return a "count" only. Again, `INSERT` is special since it may return a "result set" of newly produced keys (when they are auto-generated). But this is not standard... at all. Another exeption is that in some database `DELETE` and `UPDATE` can also return result sets (modified/deleted rows). As you see any further distinction is not really standard. – The Impaler Oct 17 '20 at 23:43

0 Answers0