SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
V-10
VIEWS Table
Protection views are always valid. A shorthand view becomes invalid if a user who
lacks purge authority for the view itself purges any of the tables or views underlying the
view. To make an invalid shorthand view valid, the owner of the invalid view must purge
and re-create the view.
VIEWS Table
The VIEWS table is a catalog table that describes the views available for the base
tables. Table V-2 describes the contents of the VIEWS table.
The VIEWS table was created in version 1, and subsequent modifications have not
been made.
Guardian names in the VIEWS table (including names of tables and views in the
statements stored in the VIEWTEXT column) are fully qualified. Table and view names
in the VIEWTEXT column are actual file names, never DEFINE names. SQL replaces
any DEFINE names with actual file names at the time you create the view.
All CHAR and VARCHAR columns in the VIEWS table use uppercase characters
except for lowercase string literals specified as part of the search condition in the
VIEWTEXT column. Search conditions that specify the system default multibyte
character set are stored as if you specified the actual character set. (For example, if
the system default multibyte character set is Kanji, the literal N” ....” is stored as
_KANJI”....”.)
Table V-2. The VIEWS Table
Column Name Data Type Description
1 VIEWNAME * CHAR (34) Name of view
2 PROTECTION CHAR (1) Y if protection view
N if shorthand view
3 VALIDDEF CHAR (1) Y if definition valid
N if definition not valid
4 AUDIT CHAR (1) Y if all underlying tables are audited
N if all underlying tables are nonaudited
M if based both on audited and nonaudited
tables
5 WITHCHECKOPTION CHAR (1) Y if defined with WITH CHECK OPTION
N if not
6 INSERTABLE CHAR (1) Y if row inserts allowed
N if not
7 VIEWTEXT VARCHAR (3000) Text of statement used to define view
* Indicates primary key