CREATE VIEW (Object)
CREATE [OR REPLACE] [FORCE | NO FORCE] VIEW [schema
.]view_name
OF [schema
.]type_name
[WITH OBJECT OID [DEFAULT | (attribute
)] ] ASviewquery
[WITH READ ONLY] [WITH CHECK OPTION [CONSTRAINTconstraint
]]
Creates an object view (view_name).
Specifies that if the view already exists, it is to be replaced.
Specifies that the view is to be created regardless of whether the view’s base tables exist or whether the owner of the schema has privileges on them.
Specifies that the view is to be created only if the base tables exist and the owner of the schema has privileges on them. This is the default.
Specifies the object type (type_name) (and optional schema) of the view.
Specifies the attributes of the object type that will be used to uniquely identified the rows in the object view. If this clause is omitted, the values default to the primary key of the base object table.
Specifies that the OBJECT OID should default to the primary key of the base object view. This is equivalent to not including the WITH OBJECT OID clause at all.
List of columns in the view from which the object identifier is to be created.
Any SQL SELECT statement without an ORDER BY or FOR UPDATE clause.
Specifies that the view cannot be used for inserts and updates.
Specifies that inserts and updates performed through the view must result in rows that the view query can select.
You must have the CREATE VIEW privilege to create a view in your own schema, or you must have CREATE ANY VIEW to create a view in another schema. You must have the Oracle8 Object option installed to create an object view.
The owner of the schema containing the view must have the privileges required to perform requested operations on the tables or views upon which this view is based. These privileges must be granted directly, not through a role.