|
|
Updatable Views
INSERT,UPDATEandDELETEstatements may be used on views.The operation is then performed on the base table upon which the view is defined. However, certain views may not be updated (for example a view containing
DISTINCTvalues, where a single row in the view may represent several rows in the base table).A view is not updatable if any of the following conditions are true:
- the keyword
DISTINCTis used in the view definition- the select list contains components other than column specifications, or contains more than one specification of the same column
- the
FROMclause specifies more than one table reference or refers to a non-updatable view- the
GROUP BYclause is used in the view definition- the
HAVINGclause is used in the view definitionNote: By defining an INSTEAD OF trigger any view can be made updatable. If all the INSTEAD OF triggers on the view are dropped, the view will revert to not updatable if one or more of the conditions are true.
|
Mimer Information Technology AB Voice: +46 18 780 92 00 Fax: +46 18 780 92 40 info@mimer.se |
|
|