patternModerate
Does the SELECT statement count into DML?
Viewed 0 times
thestatementintoselectdmldoescount
Problem
Looking at the name Data Manipulation Language (DML) I would assume, that all contained statements are actually for manipulating data.
As far as I know the
So is
As far as I know the
SELECT statement can only be used to query data, not change it. (Not taking INSERT ... SELECT into account here.)So is
SELECT part of DML and if so, why?Solution
You do manipulate and restrict data: GROUP BY, ORDER BY, TOP, JOIN, lock hints, etc
You just don't change the database state when you do.
It boils down to whether you read "manipulate" to include "change state"
You just don't change the database state when you do.
It boils down to whether you read "manipulate" to include "change state"
Context
StackExchange Database Administrators Q#5634, answer score: 11
Revisions (0)
No revisions yet.