Talk:Truncate (SQL): Difference between revisions

Content deleted Content added
DDL/DML
No edit summary
Line 14:
 
 
::I strongly agree with Mhkay:
::In SQL:2023 it's in the SQL ''data change statement'' category according to [https://standards.iso.org/iso-iec/9075/-2/ed-6/en/ISO_IEC_9075-2(E)_Foundation.bnf.txt][Https://standards.iso.org/iso-iec/9075/-2/ed-6/en/ISO IEC 9075-2(E) Foundation.bnf.txt https://standards.iso.org/iso-iec/9075/-2/ed-6/en/ISO_IEC_9075-2(E)_Foundation.bnf.txt], i.e. a DML statement.
: Furthermore, I have been communicating about this with someone who has access to the ISO standard. He states:
::I assert that the correct definition is product dependent:
<blockquote>
::* If the DBMS implements it in a way where triggers are not fired by TRUNCATE, then it's a DDL, because it's essensially a short-hand for DROP+CREATE.
TRUNCATE is:
::* If the DBMS implements it as as a logical synonym with an unconstrained DELETE, then natural logic puts it in the DML category.
 
::[[User:Troels Arvin|Troels Arvin]] ([[User talk:Troels Arvin|talk]]) 07:35, 13 November 2024 (UTC)
- an "SQL-data change statement"
- therefore an "SQL-data statement"
 
It is not:
 
- an "SQL-schema statement"
 
The terms DDL and DML are not used in the SQL standard, but those above are pretty much the equivalents. So it is definitely a DML statement.
</blockquote>
: So I'm going to change the article.
:: [[User:Troels Arvin|Troels Arvin]] ([[User talk:Troels Arvin|talk]]) 0714:3530, 1330 NovemberDecember 2024 (UTC)