Difference between truncate and delete in SQL Server - PowerPoint PPT Presentation

About This Presentation
Title:

Difference between truncate and delete in SQL Server

Description:

In SQL Server there are several a methods you can eliminate series from a desk. You can use the TRUNCATE and DELETE control. – PowerPoint PPT presentation

Number of Views:47

less

Transcript and Presenter's Notes

Title: Difference between truncate and delete in SQL Server


1
Difference between truncate and delete in SQL
Server
2
In SQL Server there are several a methods you can
eliminate series from a desk. You can use the
TRUNCATE and DELETE control. Though the end
outcome of both instructions is the same,  there
essential variations you should know about.
  The TRUNCATE control is like a DELETE control
without the     WHERE stipulation with much less
of a protection net.

More...
Stay Connected For More Updates
3
When to use TRUNCATE
    When you TRUNCATE a desk less details is
signed. This         indicates  the TRUNCATE
declaration carries out very fast     however,
it does so at the cost of not signing each row
removed.     This indicates, that you need to be
very cautious when using the     control
(actually be aware with DELETE as well!).
More...
Stay Connected For More Updates
4
Why you should use TRUNCATE
    You want to reset a desk to its vacant
condition. All series are      eliminated, and
identification key principles totally reset to
the      preliminary described principles.
    You need to have an excellent faster way of
getting rid of desk      details. I can see this
happening when you need to continuously     
transfer analyze details or you have workouts
that use work     platforms or the beginning
platforms to shop details.
.
More...
Stay Connected For More Updates
5
When to use the DELETE command
   The DELETE control is used to eliminate
details from a data      source. It is the most
popular way to do so. In its easiest type you 
   can eliminate all the series from a data
source or you can add a     WHERE stipulation to
eliminate only those conference the factors.
More...
Stay Connected For More Updates
6

   Here are some things which occur during a
DELETE that dont during the TRUNCATE  Any
removal activates are implemented on the impacted
desk.
  You are permitted to DELETE details that have
international key    restrictions described. A
TRUNCATE cannot be implemented if    these same
restrictions have established yourself.
  Record deletions dont totally reset
identification important factors.
More...
Stay Connected For More Updates
7
Join the DBA training course to make your career
as a DBA professional in this field.
  • Stay connected to CRB Tech for more technical
    optimization and other updates and information.

More...
Stay Connected For More Updates
8
Thank You
Stay Connected For More Updates
Write a Comment
User Comments (0)
About PowerShow.com