What is the use of CASCADE CONSTRAINTS?

Answer Posted / nitesh

It is mainly used in referential integrity constraints.

When you use primary key/candidate key of one relation(say,
r1) as foreign key in other relation(say, r2), you want
changes made to primary key/candidate key of r1 must reflect
in foreign key of r2. And this can be achieved by CASCADE
constraint.
eg. consider two relations account, branch(with primary key
branch_name)

create table account(.....
foreign key branch_name references branch
on delete cascade
on update cascade
..........)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is explicit mode in sql server?

539


What is use of @@ spid in sql server?

687


How many partitions a clustered index has by default in sql server 2012?

669


Difference between Logical Page and Physical Page in SSRS.

340


Is ssrs support other database except ms sql server?

96






if you encounter this kind of an error message, what you need to look into to solve this problem? : Sql server database administration

531


Why SQL Agent is used?

602


What is intellisense?

600


How can we solve concurrency problems?

577


Explain sql server service broker?

520


What is sql server management studio? : sql server management studio

591


How to create a view using data from another view?

573


Your table has a large character field there are queries that use this field in their search clause what should you do?

508


Explain the creation and execution of a user-defined function in the sql server?

590


but what if you have to create a database with two filegroups, one on drive c and the other on drive d with log on drive e with an initial size of 600 mb and with a growth factor of 15%? : Sql server database administration

534