Jump to content

Talk:Truncate (SQL)

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Troels Arvin (talk | contribs) at 14:36, 30 December 2024. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

DDL

Is it really a DDL operation? I thought the whole idea was that it affected data/content and didn't affect metadata/structure. It feels much more like DML to me. Mhkay (talk) 16:36, 17 November 2022 (UTC)[reply]


There's something better than "feels" --- it's explicitly documented in "Data manipulation" section in ISO SQL (sql:2011 and sql:2016). 5.178.229.209 (talk) 22:50, 16 May 2023 (UTC)[reply]


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, i.e. a DML statement.
Furthermore, I have been communicating about this with someone who has access to the ISO standard. He states:

TRUNCATE is:

- 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.

So I'm going to change the article.
Troels Arvin (talk) 14:30, 30 December 2024 (UTC)[reply]