Neoview SQL Reference Manual (R2.4)

Authorization and Availability Requirements
To create a view, you must have select privileges for the objects underlying the view and be the
owner of the schema or have CREATE or CREATE_VIEW privilege on the schema.
When you create a view on a single table, the owner of the view is automatically given all
privileges WITH GRANT OPTION on the view. However, when you create a view that spans
multiple tables, the owner of the view is given only SELECT privileges WITH GRANT OPTION.
If you try to grant privileges to another user on the view other than SELECT you will receive a
warning that you lack the grant option on that privilege.
Updatable and Non-Updatable Views
Single table views can be updatable. Multi-table views cannot be updatable.
To define an updatable view, a query expression must also meet these requirements:
It cannot contain a JOIN, UNION, or EXCEPT clause.
It cannot contain a GROUP BY or HAVING clause.
It cannot directly contain the keyword DISTINCT.
The FROM clause must refer to exactly one table or one updatable view.
It cannot contain a WHERE clause that contains a subquery.
The select list cannot include expressions or functions or duplicate column names.
Isolation Level Guidelines
The isolation level specified in the CREATE VIEW SELECT statement is implemented when the
view is used in a DML statement.
For descriptions of these four access options, see “Data Consistency and Access Options”
(page 27).
Single Table in a View
Create view v as select * from t for read uncommitted access;
Select * from v;
The SELECT statement reads rows in table t in READ UNCOMMITTED access. The same
behavior would occur with this SELECT statement:
Select * from t for read uncommitted access;
Multiple Tables in a View
Create view v as select * from t1, t2 for serializable access;
Select * from v;
The SELECT statement reads rows in tables t1 and t2 in SERIALIZABLE access. The same
behavior would occur with this SELECT statement:
select * from t1,t2 for serializable access
Explicit User-Specified Isolation Level on SELECT From a View
An explicitly-specified access option in the view definition cannot be overwritten, either by
another explicit access option in the query or by a session-level isolation setting. After the view
definition has been expanded, the isolation level that is closest to the specified table in the query
is used.
For example:
Create view v as select * from t1 for read uncommitted access;
Select * from v for serializable access;
After view expansion, the query in this example becomes:
Select * from (select * from t1 for read uncommitted access) for serializable access;
CREATE VIEW Statement 101