Database - Introduction to SQL - Discussion
Discussion Forum : Introduction to SQL - General Questions (Q.No. 8)
8.
ON UPDATE CASCADE ensures which of the following?
Discussion:
19 comments Page 2 of 2.
Pranit sharma said:
1 decade ago
In my issue I had to define some additional operations (trigger) for updating concert's table. Those operations had to modify club_name and band_name. I was unable to do it, because of reference. I couldn't modify concert and then deal with club and band tables. I couldn't also do it the other way. ON UPDATE CASCADE was the key to solve the problem.
Sandeep sharma said:
1 decade ago
Cascading means if we take action on some thing then the references will get affected automatically
Example:
Like If we update record of master table the child table record will get update .
Like if take example of trigger:
create or replace trigger cascade_update
after update of c1 on t1
for each row
begin
update t2
set c2 = :new.c1
where c2 = :old.c1;
end;
/
SQL> update t1
2 set c1 = 2
3 where c1 = 1;
1 row updated.
SQL> select * from t2;
C2
----------
2
table t2 record updated automatically.
This feature is data integrity of sql...............
Example:
Like If we update record of master table the child table record will get update .
Like if take example of trigger:
create or replace trigger cascade_update
after update of c1 on t1
for each row
begin
update t2
set c2 = :new.c1
where c2 = :old.c1;
end;
/
SQL> update t1
2 set c1 = 2
3 where c1 = 1;
1 row updated.
SQL> select * from t2;
C2
----------
2
table t2 record updated automatically.
This feature is data integrity of sql...............
Uma said:
1 decade ago
Is update cascad is same as if else cascading?
Neha said:
1 decade ago
Please define each term's relation with question.
Aniket said:
1 decade ago
Whts materializes views? please explain.
M Shankar Rao said:
1 decade ago
Please give the complete explanation
Suresh said:
1 decade ago
Please anyone explain.
Suri said:
1 decade ago
What is cascade?
Gowthaman said:
1 decade ago
Sir how did say that answer is correct? Sir you explain shortly.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers