View

The View category is located in the Root > Script > Objects category, and can contain the following items that define how views are modeled for your DBMS.

Item

Description

[Common items]

The following common object items may be defined for views:

  • AfterCreate, AfterDrop, AfterModify

  • BeforeCreate, BeforeDrop, BeforeModify

  • Create, Drop

  • Enable, EnableSynonym

  • Header, Footer

  • ModifiableAttributes

  • Options

  • Permission

  • ReversedQueries, ReversedStatements

  • SqlAttrQuery, SqlListQuery, SqlOptsQuery, SqlPermQuery

For a description of each of these common items, see Common object items.

EnableIndex

Specifies a list of view types for which a view index is available.

Example (Oracle 10g):

MATERIALIZED

SqlListSchema

Specifies a query used to retrieve registered schemas in the database. This item is used with views of XML type (a reference to an XML document stored in the database).

When you define an XML view, you need to retrieve the XML documents registered in the database in order to assign one document to the view, this is done using the SqlListSchema query.

Example (Oracle 10g):

SELECT schema_url FROM dba_xml_schemas

SqlXMLView

Specifies a sub-query used to improve the performance of SqlAttrQuery.

TypeList

Specifies a list of types (for example, DBMS: relational, object, XML) for views. This list populates the Type list of the view property sheet.

The XML type is to be used with the SqlListSchema item.

ViewCheck

Specifies whether the With Check Option check box in the view property sheet is available. If the check box is selected and the ViewCheck parameter is not empty, the value of ViewCheck is generated at the end of the view select statement and before the terminator.

Example (SQL Anywhere 10):

If ViewCheck is set to with check option, the generated script is:

create view TEST as
select CUSTOMER.CUSNUM, CUSTOMER.CUSNAME, CUSTOMER.CUSTEL
from CUSTOMER
with check option;

ViewComment

Specifies a statement for adding a view comment. If this parameter is empty, the Comment check box in the Views groupbox in the Tables and Views tabs of the Generate Database box is unavailable.

Example (Oracle 10g):

[%VIEWSTYLE%=view? comment on table [%QUALIFIER%]%VIEW% is
%.q:COMMENT%]

ViewStyle

Specifies a view usage. The value defined is displayed in the Usage list of the view property sheet.

Example (Oracle 10g):

materialized view