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
Can you explain what are commit and rollback in sql?
What is an execution plan? When would you use it?
Explain table valued parameters in sql server? Why tvp used?
Explain aggregate functions?
Explain what are the basic functions for master, msdb, model, tempdb databases?
you notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it? : Sql server administration
What do you mean by data integrity?
What happens if an integer is too big for int date type?
What are the differences between decimal and float in ms sql server?
What does normalization do to data?
What are the approximate numeric data types?
Explain the properties of sub-query in sql server?
What is the downside of using udf?
How to list all tables in the database using odbc_tables()?
How to find a value in another dataset based on current dataset field (ssrs 2008 r2)?