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 to create a Master database in SQL server ?
What is normalization? Explain its different types?
Can one drop a column from a table?
Why Master database is required?
your distribution database is full what will u do
How to create percentile function?
How important do you consider cursors or while loops for a transactional database?
What is precedence constraint?
What are sub reports?
why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it? : Sql server administration
what is the system function to get the current user's user id? : Sql server database administration
What is rolap and its advantage? : sql server analysis services, ssas
How do you create a data source?
How to list all user names in a database?
What is the most common trace flags used with sql server?