dependent column [message #213930] |
Fri, 12 January 2007 16:44 |
Swoop_Alex
Messages: 1 Registered: January 2007
|
Junior Member |
|
|
i have a table with some columns representing grades and an average column. how can i make so when i modify a grade the average is automaticaly updated. thanks
|
|
|
|
|
|
Re: dependent column [message #213945 is a reply to message #213940] |
Fri, 12 January 2007 22:24 |
rleishman
Messages: 3728 Registered: October 2005 Location: Melbourne, Australia
|
Senior Member |
|
|
I take it this is a school exercise. If so, the exercise is to find out how to bypass the mutating table problem. If you use Google or the search facility on this site, you will soon find out how to do it.
Ross Leishman
|
|
|
Re: dependent column [message #214129 is a reply to message #213945] |
Mon, 15 January 2007 01:47 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
You could create a view on the table that included the computed average as a column.
Or you could create an On Commit Fast Refresh Materialized view on the whole table and include the computed column in that.
As the Op was @Swoop_Alex, and the push for a trigger based solution came from @Ab_Trivedi, can we assume they're in the same class?
|
|
|