Compare and contrast TRUNCATE and DELETE for a table.

Answer Posted / santosh

Basically truncate is a DDL and Delete is DML. You can use
delete to remove rows depending on certain criteria and it
generated redo logs and can be rolled back before you
commit the transaction, Where as the truncate is used to
remove all the data in the table. Once you execute this
command u can not rollback this transaction.and commit is
not required for the truncate statement

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different authentication modes in sql server and how can you change authentication mode? : sql server DBA

776


what is the diffrence between core dba and apps dba?

2315


Database is hung. Old and new user connections alike hang on impact. What do you do? Your SYS SQLPLUS session IS able to connect.

1777


You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?

4167


What is a system database and what is a user database? : sql server DBA

827


A table is classified as a parent table and you want to drop and re-create it. How would you do this without affecting the children tables?

2219


What are the steps you will take to improve performance of a poor performing query?

2629


how can you find out if a table can be redefined?

789


who owns the operating system files created by the utl_file package?

815


what is the use of ocr?

790


Which autogrowth database setting is good? : sql server DBA

761


how can you initialize log miner?

840


I have A,B,C servers.i want to 3 servers jobs move to D server(target server)..how? note: i said that take the backup of msdb and restore to the target server..he said while restoring jobs replaced. what is the solution

1855


When setting replication, can you have distributor on sql server 2005, publisher on sql server 2008? : sql server DBA

779


Typically, where is the conventional directory structure chosen for Oracle binaries to reside?

2290