Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Article Discussions
»
Article Discussions by Author
»
Discuss content posted by Prakriti Agrawal
»
TRUNCATE
41 posts, Page 5 of 5
««
«
1
2
3
4
5
TRUNCATE
Rate Topic
Display Mode
Topic Options
Author
Message
vk-kirov
vk-kirov
Posted Wednesday, April 07, 2010 1:40 PM
Hall of Fame
Group: General Forum Members
Last Login: 2 days ago @ 1:32 AM
Points: 3,187,
Visits: 4,140
Peter Trast (4/7/2010)
vk-kirov (4/7/2010)
Maybe because TRUNCATE manipulates metadata, not data? (It's my suggestion only)
DOES truncate delete metadata??? (I am thinking no).
You are right. TRUNCATE does not
delete
metadata, it
manipulates
metadata. But... what is the relation between your (rhetorical) question and my suggestion?
Let's see what exactly TRUNCATE does (
http://msdn.microsoft.com/en-us/library/ms177570.aspx
):
TRUNCATE TABLE removes the data by deallocating the data pages used to store the table data and records only the page deallocations in the transaction log.
TRUNCATE TABLE always locks the table and page but not each row.
Page deallocation is surely a metadata manipulation. Data remain intact in their comfortable pages... until the time comes.
Peter Trast (4/7/2010)
I guess I was suggesting that the person who authored that webpage didn't know what he was talking about
Perhaps the definitions of DML/DDL on that page are slightly inaccurate.
But there's a dramatical difference between DML and DDL statements in Oracle. A DDL statement is committed implicitly and immediately, and cannot be rolled back. This is why it's very important to know the classification of the SQL commands.
Happily, we are using SQL Server and can roll back any DDL command; so I consider the question "is TRUNCATE a DDL statement or not?" as a theoretical question. Happily, Paul gave the straightforward answer to this question: it's a DML statement because Microsoft documentation says it. Other arguments may be (and have been) debated at least on two forum pages. Even using the de-duck-tion methods
Post #898942
« Prev Topic
|
Next Topic »
41 posts, Page 5 of 5
««
«
1
2
3
4
5
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.