Quadcap Software

Quadcap Embeddable Database

Quadcap Software

CREATE VIEW statement

This statement is used to create a view. A view is a named virtual table which is derived from one or more base tables. By default, views are created in the current schema.

Syntax

createViewStmt
  :  "create" "view" sqlId 
    (  LPAREN idList RPAREN 
    |  
    ) 
    "as" queryExpression 
    (  "with" 
      (  "cascaded" 
      |  
      ) 
      "check" "option" 
    |  
    ) 
    
  ;


Examples

CREATE VIEW TEMP_SS (EMPNUM,GRADE,CITY)
AS     SELECT EMPNUM, GRADE, CITY
FROM   STAFF
WHERE  GRADE > 12;

Implementation Notes

  • CHECK OPTION only supports CASCADED; LOCAL CHECK OPTION is not allowed.