What is the difference between Drop and Truncate

Answer Posted / vishant kakwani

drop is delete the data with table and if id is used as autoincrement then id can't be started with 1.
Truncate is delete the only data table as it is and autoincrement id will started with 1 every time if you truncate the table.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Ms sql server index?

544


What is difference between unique and primary key?

479


Is INSTEAD OF trigger directly applicable to Table ?

575


Mention the differences between local and global temporary tables.

572


Explain various On-Delete options in a DB table. Which is the default option?

900






What is #temp and @table variable in SQL server?

586


What are the differences between triggers and stored procedures?

539


What is difference between table aliases and column aliases? Do they affect performance?

510


What is the downside of using udf?

564


Does partitioning help performance?

531


How to generate create view script on an existing view?

562


What is log shipping? Can we do logshipping with SQL Server 7.0 - Logshipping is a new feature of SQL Server 2000. We should have two SQL Server - Enterprise Editions. From Enterprise Manager we can configure the logshipping. In logshipping the transactional log file from one server is automatically updated into the backup database on the other server. If one server fails, the other server will have the same db and we can use this as the DR (disaster recovery) plan.

2316


Do you know what are acid properties of transaction?

526


How to connect php with different port numbers?

555


what data regions are and what are the different data regions?

101