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
What are the different authentication modes in sql server and how can you change authentication mode? : sql server DBA
What are statistics, under what circumstances they go out of date, how do you update them?
What are the operating modes in which database mirroring runs? : sql server DBA
How do you troubleshoot errors in a sql server agent job? : sql server DBA
What are the commands you'd issue to show the explain plan for "select * from dual"?
how can you schedule a job in database?
In which dictionary table or view would you look to determine at which time a snapshot or MVIEW last successfully refreshed?
Typically, where is the conventional directory structure chosen for Oracle binaries to reside?
In what script is "snap$" created? In what script is the "scott/tiger" schema created?
Query processing is slow(eg select query)how will u solve that
How would you go about verifying the network name that the local_listener is currently using?
How do you open a cluster administrator? : sql server DBA
What are the recovery models for a database? : sql server DBA
What is the difference between dropping a database and taking a database offline? : sql server DBA
how can a session indicate its interest in receiving alerts?