Name
CREATE/ALTER/DROP VIEW
Synopsis
CREATE Syntax:
CREATE [OR REPLACE] [[NO] FORCE] VIEW [schema.]view_name[ { ( {alias[Column_Constraint_Clause[Column_Constraint_Clause]...] |Table_Constraint_Clause} [,[Table_Constraint_Clause]... ] } ) | OF [schema.] type_name { WITH OBJECT IDENTIFIER { DEFAULT | (attribute [,attribute]...)} | UNDER [schema.] superview } ( {Table_Constraint_Clause| attributeTable_Constraint_Clause[Table_Constraint_Clause...] }) | OF XMLTYPE [[XMLSCHEMA XML_Schema_URL] ELEMENT {element | XML_Schema_URL#element] WITH OBJECT IDENTIFIER {(expr[,expr...]) | DEFAULT} }] ASviewquery[WITH {READ ONLY | CHECK OPTION [CONSTRAINTconstraint_name] }]
ALTER Syntax:
ALTER VIEW [schema.]view_name{ADDTable_Constraint_Clause| MODIFY CONSTRAINTTable_Constraint_Clause{RELY | NORELY} | DROP {CONSTRAINTconstraint_name| PRIMARY KEY | UNIQUE (column[,column]... )} | COMPILE }
DROP Syntax:
DROP VIEW [schema.view_name]
Creates, modifies, or removes a view.
The ALTER VIEW statement explicitly recompiles a view. We recommend that you issue it after making changes to any of the view’s underlying base tables.
Keywords
- Table_Constraint_Clause
May be included in the CREATE/ALTER VIEW statement beginning in Oracle9i. See the discussion under Section 7.1 for more information.
- FORCE
Specifies that the view be created regardless of whether the view’s base tables exist or whether the owner of the schema has privileges on them.
- NOFORCE
Specifies that the view be created only if the ...