What's the difference between DELETE TABLE and TRUNCATE
TABLE commands?
Answer Posted / ranjay
Truncate / When use Truncate after that insert new record
into the table row started from 1 but
Delete / When delete record in a table after that insert
new record row id started from after the deleted row
For e g, I m create a table Employee and insert 5 record
row number set identity true and increment by 1
After that, I m delete last record I e row number is 5
after delete I m insert new record in a table then row id
started from 6 not 5 but when truncate table row id start
from 1
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are the different types of triggers in SQL SERVER?
Does partitioning help performance?
how would you write a sql query to compute a frequency table of a certain attribute involving two joins? What changes would you need to make if you want to order by or group by some attribute? What would you do to account for nulls?
What are different types of statements that are supported by sql?
What are the differences between user defined functions and stored procedures?
What is the contrast amongst drop and truncate?
How would we use distinct statement? What is its use?
Explain the collation?
What do mean by xml datatype?
What are the new security features added in sql server 2012? : sql server security
What is the correct order of the logical query processing phases?
Tell me can we use custom code in ssrs?
Can we deploy SSRS reports on our personal website?
What is the difference between a unique key and primary key?
What is the difference between dataadapter and datareader?