Difference between a statement and a query in SQL

后端 未结 6 904
暗喜
暗喜 2020-12-14 00:14

I still live in this ambiguity: conceptually what\'s the difference between a statement and a query in SQL? Can anybody give a definition f

6条回答
  •  暖寄归人
    2020-12-14 00:24

    They're used interchangeably by most, but some often use the word "query" to mean, specifically, SELECT statements, because when you query something or someone, you want information. And SELECT queries return result sets, so that'd fit the description nicely. This also is evident in the fact that SELECT statements are formally called DQL (Data Query Language) statements.

提交回复
热议问题