SqlShare.com Logo
 
Skip Navigation Links
Home
Video List
Events
Classes
About Us
Login / Register
Subscribe RSS Feed 

Confio Ignite 8

Using Truncate Table

Need to remove ALL the rows in a hurry? Truncate is a lot faster then delete, easy to use, and only has a few restrictions - most of which you'll find make sense. It also has one quirk you might not expect. We'll show you how it works, debunk a myth, and tell you the rules!

Duration:
4 mins 45 secs
Skill Level:
100
Rating:
4.58 out of 5
Publish Date:
February 11, 2010
Using Truncate Table You must be logged in to view this video.  
Bookmark and Share
 
1=Poor, 3=Good, 5=Excellent

About the Author

Image of Andy Warren
Andy Warren is a software trainer focusing on SQL Server, a member of the PASS Board of Directors, and a principal in this site - SQLShare.com.

References



Comments
Matt Karp on 2/17/2010
Thorough

Martin Miller on 2/17/2010
Thanks Andy. -Martin

Ron Newlin on 2/17/2010
again concise and effective

Dan on 2/17/2010
Great video!

Stephanie Brown on 2/17/2010
I'd always heard that Truncate didn't log; I'm glad you cleared up that urban myth! Thanks! Some of the caveats were new to me as well. This was an excellent video; just the right speed, and good clear information.

Peter Phipps on 2/17/2010
In SQL 2005 the truncate permission could not be delagated i.e. you needed to be a dbo to perform the operation. Is this still the case in 2008. If so this would be good to add to the demonstration.

Krishna P on 2/17/2010
caveats were especially helpful !

vijayan on 2/18/2010
nice side effect points

AEE49878AC on 2/18/2010
One other very important caveat is permissions. Unlike DELETE, TRUNCATE is considered a DDL statement, so you must have at least ALTER TABLE permissions.

Christian Bahnsen on 2/18/2010
Thanks. I use truncate often but didn't know about the identity reset.

Rick Fonner on 2/18/2010
How can I get the sample SQL used during the video? rfonner@wrbmag.com

Paul Sprunger on 2/18/2010
Thanks Andy. Great job.

Jim Hunt on 2/18/2010
Easy to follow - would have been helpful to have the code to run while pausing the video to get a more hands on feel.

Melisa Wrex on 2/18/2010
I love these videos! They are quick and give valuable information step by step. I would consider myself an intermediate level of experience with SQL and many of these topics show me things that I haven't used before. Great job!

Danny Costello on 2/18/2010
Some thnig I do quite often, but didn't fully understand the outlined caveats... many thanks

Ed Kelliher on 2/18/2010
First time using this site and I like it.

Mike on 2/18/2010
very good video, covered a lot in short time. very clear and easy to follow. i've used truncate for a while and i learned some additional things from this video.

Fantastic information.

Emine Dekkar on 2/19/2010
rollback works with Trucate :) !!! wow did not know that!

Alex Fekken on 2/19/2010
Might be useful to note the permissions you need for Truncate Table.

Ranjith on 2/20/2010
Nicely put together !! Thanks

AA7AB8CA57 on 2/22/2010
Very organized and scripted out so it was easy to follow and flowed well.

Irshad Malik on 2/22/2010
Great to know all the caveats...Nice

Rupesh Dhore on 3/1/2010
Good video to give valuable information on truncate

Steve Culshaw on 3/5/2010
And I did think Truncate wasn't logged, so it dispelled that myth for me !

Robert Horkay on 3/9/2010
Truncate table can be delegated in 2005 and 2008. It's very important to remember that truncate table requires dbo / ddl admin rights, which is extremely high level of permissions to give to a user or an application / etl id. I have an example here of how to delegate. http://www.lifeasbob.com/2010/02/22/GrantTruncateTablePermissionsrevisited.aspx

JohnG on 3/31/2010
Good examples. Clear, consise, to the point.

7F718A6344 on 4/6/2010
well done at explaining and showing the differences

James Lawrence on 4/12/2010
Wow, I always thought 'truncate' did NOT log! Learned something new.

datalink on 4/19/2010
very informative and concise

StefanoCirelli on 5/27/2010
pretty clear, thank you

abdul samath on 5/30/2010
super

race on 1/4/2011
Video quality is not very clear please



Must Be Logged In
 

How Do I Become a Video Author? |  Newsletter History

Copyright © Fourdeuce, Inc., 2005-2009. All Rights Reserved | Privacy Policy | Terms & Conditions