What is the difference between DELETE and TRUNCATE?

Answer Posted / manivasan.s

You cannot TRUNCATE a table that has any foreign key
constraints. You will have to remove the contraints,
TRUNCATE the table, and reapply the contraints.

You can DELETE any row that will not violate a constraint,
while leaving the foreign key or any other contraint in place.

Is This Answer Correct ?    10 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of privileges are available in sql?

729


What is the usage of distinct keyword?

622


What is the difference between the conventional and direct path loader? : aql loader

642


what is 'mysqld'? : Sql dba

534


what is data integrity? : Sql dba

590






Can ddl statements be used in pl/sql?

589


Explain the types of joins in sql?

565


What is foreign key in sql with example?

504


How do you explain an index number?

527


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

1521


What is scalar function in sql?

525


How to add new employee details in an employee_details table with the following details

637


What are the syntax and use of the coalesce function?

545


Are sql connections encrypted?

552


how to check server status with 'mysqladmin'? : Sql dba

554