The second restriction applies to all columns in views whose definition includes a GROUP BY or aggregate clause. Here is a view defined with a GROUP BY clause and the rows seen through it:
CREATE VIEW categories (category, average_price) |
||
AS SELECT type, AVG(price) |
||
FROM titles |
||
GROUP BY type |
||
SELECT * FROM categories |
||
category |
average_price |
|
-------- |
------------- |
|
business |
13.73 |
|
mod_cook |
11.49 |
|
popular_comp |
21.48 |
|
psychology |
13.50 |
|
trad_cook |
15.96 |
|
UNDECIDED |
NULL |
|
(6 row(s) affected) |
It does not make sense to insert rows into the categories view. To what group of underlying rows would an inserted row belong? Updates on the average_price column cannot be allowed because there is no way to know from any value entered there how the underlying prices should be changed.