interview questions and answers

Database Interview Questions | SQL Interview Questions

Home interview questions Database interview questions SQL 
Friday, 10 February 2012
Main Menu
Home
Online Test
Contest
Search
FAQs
Contact Us
Login
Most Popular Category
JAVA

Microsoft Technologies
ASP, C#, DotNet, ...

Programming
C++, PHP, VB, ...

SAP

Testing

Web Technologies

Polls
Does personal networking help in job search?
 
IT Placement Papers interview questions Database interview questions SQL

This category contains SQL Interview Questions and Answers


What is the difference between Truncate and Delete interms of Referential Integrity?

PDF Print E-mail

DELETE removes one or more records in a table, checking referential Constraints (to see if there are dependent child records) and firing any DELETE triggers. In the order you are deleting (child first then parent) There will be no problems. TRUNCATE removes ALL records in a table. It does not execute any triggers. Also, it only checks for the existence (and status) of another foreign key Pointing to the table. If one exists and is enabled, then you will get The following error. This is true even if you do the child tables first. ORA-02266: unique/primary keys in table referenced by enabled foreign keys You should disable the foreign key constraints in the child tables before issuing the TRUNCATE command, then re-enable them afterwards.




Be first to comment this article

Only registered users can write comments.
Please login or register.

 
< Prev   Next >

Database Interview Questions | SQL Interview Questions

Top!
Top!
Copyright © 2008 InterviewDuniya.com All Rights Reserved.
Partner Site: Maheshwari Matrimony