DML and Views

There are two types of views: simple and complex. Table 10.2 compares the two types of views.

Simple views can be used in DML statements because the records displayed in a simple view relate to one row of a table. Complex-view records are virtual records and do not generally relate to one row of a table. The DELETE command cannot be used against a complex view if the view has any of the following features:

  • Contains a group function

  • Contains a GROUP BY clause

  • Contains the DISTINCT keyword

  • Contains the pseudocolumn ROWNUM

A view cannot be updated if the view contains any of the above properties. It also cannot be updated if the view has the following property:

  • Contains a column that is defined by expressions. These are columns that ...

Get Oracle SQL and PL/SQL Handbook: A Guide for Data Administrators, Developers, and Business Analysts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.