CoolInterview.com - World's Largest Collection of Interview Questions & Answers, FAQs, queries, sample papers, exam papers, dumps, what, why, how, where, when questions
Our Services
Get 9,000 Interview Questions & Answers in an eBook.




Get it now !!
Send your Resume to 6000 Companies

Search Interview Questions

Question: What is the use of CASCADE CONSTRAINTS?

Answer: When this clause is used with the DROP command, a parent table can be dropped even when a child table exists.



Category SQL Interview Questions & Answers - Exam Mode / Learning Mode
Rating (1.1) By 911 users
Added on 10/12/2009
Views 26735
Rate it!
Question: What is the use of CASCADE CONSTRAINTS?
Answer:

When this clause is used with the DROP command, a parent table can be dropped even when a child table exists. Source: CoolInterview.com


For identifying the continuous constraints Source: CoolInterview.com

Answered by: sabari | Date: | Contact sabari Contact sabari

cascading is used for maintaining referencial integrity rules, which says that foreign key attributes values should be either subset of primary key values or null.
with cascading when parent is deleted child could be deleted/set null/set default according to cascade type.All this is for maintaing integrity. Source: CoolInterview.com

Answered by: Ashish | Date: | Contact Ashish Contact Ashish

The cascade option of the drop clause causes any dependent constraints also to be dropped. Source: CoolInterview.com

Answered by: SHEETAL.H.KULKARNI | Date: 11/21/2007 | Contact SHEETAL.H.KULKARNI Contact SHEETAL.H.KULKARNI

we cant able to delete a record from the parent table if there is some corresponding record exists in the child table.

for this we are using cascading constraint. with the help of cascading constraint we can able to delete a record from the parent table as well as all the corresponding records from the child table.even we can set some null values. Source: CoolInterview.com

Answered by: sathish kumar | Date: 2/21/2009 | Contact sathish kumar Contact sathish kumar

When we delete the record in parant table , the corresponding records in child table will be deleted automatically. Source: CoolInterview.com

Answered by: Ramesh | Date: 4/27/2009 | Contact Ramesh Contact Ramesh

cascade constraints describes about the parent-child relationship between tables. Source: CoolInterview.com

Answered by: pushpa g | Date: 5/30/2009 | Contact pushpa g Contact pushpa g

cascade option plays a key role in foreign and primary key table.

if record in primary key table is deleted then record in foreign key table is automatically deleted.

Source: CoolInterview.com

Answered by: Biswajit Mohapatra | Date: 7/3/2009 | Contact Biswajit Mohapatra Contact Biswajit Mohapatra

cascade delete means if primary key value is deleted than foreign key value is also deleted. Source: CoolInterview.com

Answered by: faran | Date: 8/16/2009 | Contact faran Contact faran

assume that if we r using any foreign key,and because of any resion it is compulsary to delete the primary key value,for this firstly we will have to delete all value of forign key which is refering the value of primary key,it is vary tadious,to overcome with this problem we use On delete cascade or on delete null ,On delete cascade will directly remove aal the value of foreign key which is referin the value of primary key,and on delete null will put the null without deleting.
Source: CoolInterview.com

Answered by: Shabbir Alam | Date: 8/18/2009 | Contact Shabbir Alam Contact Shabbir Alam

cascading is done in sql2 to maintain integrity rules in sql2 when we write cascade in a query it will tell to delete all the column which are dependent on that query row deletion Source: CoolInterview.com

Answered by: Naved | Date: 8/31/2009 | Contact Naved Contact Naved

The CASCADE CONSTRAINTS clause drops all
referential integrity constraints that refer to the
primary and unique keys defined on the dropped
columns Source: CoolInterview.com

Answered by: monika | Date: 9/17/2009 | Contact monika Contact monika

The cascade option of the drop clause causes any dependent constraints also to be dropped. Source: CoolInterview.com

Answered by: Mukesh | Date: 10/3/2009 | Contact Mukesh Contact Mukesh

child record gets automatically delted when parent record is delete if on delete cascase option is used whille creating table Source: CoolInterview.com

Answered by: naved khan | Date: 12/3/2009 | Contact naved khan Contact naved khan

with the help of cascading constraint we can able to delete a record from the parent table as well as all the corresponding records from the child table.even we can set some null values.
Source: CoolInterview.com

Answered by: Vicky Rana | Date: 1/20/2010 | Contact Vicky Rana Contact Vicky Rana

consider there are two tables and both are inter related with their keys(foreign key ) then you cannot delete parent table, by using delete cascade you can delete constraint pertaining to parent table even with existence of child table Source: CoolInterview.com

Answered by: Manju | Date: 2/1/2010 | Contact Manju Contact Manju

cascade constraints

is used ti change the default behavior of the foreign relation ship

if delete the record the parent table same record which is exist in the child table. that will also deleted
Source: CoolInterview.com

Answered by: vikneswaran | Date: 2/11/2010 | Contact vikneswaran Contact vikneswaran

drop is used for deleting entire table Source: CoolInterview.com

Answered by: vijay | Date: 2/17/2010 | Contact vijay Contact vijay

The cascade option of the drop clause causes any dependent constraints also to be dropped.


Source: CoolInterview.com

Answered by: bhaskar | Date: 4/16/2010 | Contact bhaskar Contact bhaskar

Hi,

1-Cascade constraint is used with drop column clause.
2-Cascade constraint drops all referential integrity constraint primary key and unique key from a multicolumn table.
3-Cascade constraint also drop multicolumn constraint.

Alter table Emp
Drop (PK) cascade constraint;

Source: CoolInterview.com

Answered by: Amit | Date: 4/16/2010 | Contact Amit Contact Amit

when we want to delete parent table but related with child so we cant do that so we can use the casecade
Source: CoolInterview.com

Answered by: Darshan.vyas | Date: 4/18/2010 | Contact Darshan.vyas Contact Darshan.vyas

cascading constraint are used to decrease the line of code and reduce the design cost. Source: CoolInterview.com

Answered by: dinesh | Date: 5/15/2010 | Contact dinesh Contact dinesh

Basically Cascading constraints are use to maintain the Referencial integrity i.e. when we delete some record from parent table the correspoding data in child table should be affected. Source: CoolInterview.com

Answered by: Manoj ku. Bardhan | Date: 6/16/2010 | Contact Manoj ku. Bardhan Contact Manoj ku. Bardhan

cascade constraint is used to maintain intigrity into database.so the in future do not confilct data Source: CoolInterview.com

Answered by: Nikunj Patel | Date: 7/7/2010 | Contact Nikunj Patel Contact Nikunj Patel

cascade option plays a key role in foreign and primary key table for maintaining the integrity

if record in primary key table is deleted / Updated then record in foreign key table is automatically deleted / Updated.
Source: CoolInterview.com

Answered by: Sachin Surve | Date: 7/8/2010 | Contact Sachin Surve Contact Sachin Surve

Specify CASCADE CONSTRAINTS to drop all referential integrity constraints that refer to primary and unique keys in the dropped table. If you omit this clause, and such referential integrity constraints exist, then the database returns an error and does not drop the table. Source: CoolInterview.com

Answered by: prasad | Date: 9/9/2010 | Contact prasad Contact prasad


If you have the better answer, then send it to us. We will display your answer after the approval

Rules to Post Answers in CoolInterview.com:-

  • There should not be any Spelling Mistakes.
  • There should not be any Gramatical Errors.
  • Answers must not contain any bad words.
  • Answers should not be the repeat of same answer, already approved.
  • Answer should be complete in itself.

Post your answer here

Inform me about updated answers to this question.
Related Questions
View Answer
Which function is used to find the largest integer less than or equal to a specific value?
View Answer
What is the output of the following query
SELECT TRUNC(1234.5678,-2) FROM DUAL;
View Answer

Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.

View All SQL Interview Questions & Answers - Exam Mode / Learning Mode




India News Network
Latest 20 Questions
Payment of time- barred debt is: (a) Valid (b) Void (c) Illegal (d) Voidable
Consideration is defined in the Indian Contract Act,1872 in: (a) Section 2(f) (b) Section 2(e) (c) Section 2(g) (d) Section 2(d)
Which of the following is not an exception to the rule, "No consideration, No contract": (a) Natural love and affection (b) Compensation for involuntary services (c) Completed gift (d) Agency
Consideration must move at the desire of: (a) The promisor (b) The promisee (c) The promisor or any other party (d) Both the promisor and the promisee
An offer which is open for acceptance over a period of time is: (a) Cross Offer (b) Counter Offer (c) Standing Offer (d) Implied Offer
Specific offer can be communicated to__________ (a) All the parties of contract (b) General public in universe (c) Specific person (d) None of the above
_________ amounts to rejection of the original offer. (a) Cross offer (b) Special offer (c) Standing offer (d) Counter offer
A advertises to sell his old car by advertising in a newspaper. This offer is caleed: (a) General Offer (b) Special Offer (c) Continuing Offer (d) None of the above
In case a counter offer is made, the original offer stands: (a) Rejected (b) Accepted automatically (c) Accepted subject to certain modifications and variations (d) None of the above
In case of unenforceable contract having some technical defect, parties (a) Can sue upon it (b) Cannot sue upon it (c) Should consider it to be illegal (d) None of the above
If entire specified goods is perished before entering into contract of sale, the contract is (a) Valid (b) Void (c) Voidable (d) Cancelled
______________ contracts are also caled contracts with executed consideration. (a) Unilateral (b) Completed (c) Bilateral (d) Executory
A offers B to supply books @ Rs 100 each but B accepts the same with condition of 10% discount. This is a case of (a) Counter Offer (b) Cross Offer (c) Specific Offer (d) General Offer
_____________ is a game of chance. (a) Conditional Contract (b) Contingent Contract (c) Wagering Contract (d) Quasi Contract
There is no binding contract in case of _______ as one's offer cannot be constructed as acceptance (a) Cross Offer (b) Standing Offer (c) Counter Offer (d) Special Offer
An offer is made with an intention to have negotiation from other party. This type of offer is: (a) Invitation to offer (b) Valid offer (c) Voidable (d) None of the above
When an offer is made to the world at large, it is ____________ offer. (a) Counter (b) Special (c) General (d) None of the above
Implied contract even if not in writing or express words is perfectly _______________ if all the conditions are satisfied:- (a) Void (b) Voidable (c) Valid (d) Illegal
A specific offer can be accepted by ___________. (a) Any person (b) Any friend to offeror (c) The person to whom it is made (d) Any friend of offeree
An agreement toput a fire on a person's car is a ______: (a) Legal (b) Voidable (c) Valid (d) Illegal
Cache = 2.578125 Seconds