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
How many types of database relationship in sql server?
What is spid in sql server profiler?
Why you need indexing? Where that is stored and what you mean by schema object? For what purpose we are using view?
What is mssql?
You are doing log shipping due to some reasons it is failing. How you will proceed from there
Explain about temporary stored procedure?
What are the types of sql server?
What is local temp table?
Where can you add custom error messages to sql server?
What is the difference between sdf and mdf?
How many types of the database links?
What are the different types of locks in the database?
there is a trigger defined for insert operations on a table, in an oltp system. The trigger is written to instantiate a com object and pass the newly inserted rows to it for some custom processing. What do you think of this implementation? Can this be implemented better? : Sql server database administration
Why use view instead of a table?
What is data block and how to define data block size?