HiveBrain v1.2.0
Get Started
← Back to all entries
patternMinor

Is a SQL query still called a "query" when doing a deletion, update or insertion?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
insertioncalledupdatesqlquerydoingdeletionwhenstill

Problem

I'm not sure what to call a query that... isn't really a query; is "statement" a better word to use in place? Or how about "script"?

Or would something else be more appropriate?

Note: I've seen someone call it a "DELETE query" once

Solution

I typically call them DML statements or just statements. Query is commonly used for convenience.

After all, you're issuing a query against the database - if you say...

DELETE dbo.table WHERE id = 5;


...isn't at least part of that a query? What about...

INSERT dbo.table1(col) SELECT col FROM dbo.table2 WHERE ...


?

And no, I would not call them "scripts" - that implies something else altogether (usually a collection of statements, in a wide variety of languages, and commonly saved to a file).

Code Snippets

DELETE dbo.table WHERE id = 5;
INSERT dbo.table1(col) SELECT col FROM dbo.table2 WHERE ...

Context

StackExchange Database Administrators Q#64381, answer score: 6

Revisions (0)

No revisions yet.