SQL/MP Reference Manual
HP NonStop SQL/MP Reference Manual—523352-013
C-170
Considerations—CREATE VIEW
The CREATE VIEW statement, including any name expansion from the use of 
asterisks in column, view, and table specifications, can have a maximum of 3,000 
bytes.
The data types of the columns of the view are inherited from the columns of the 
table or view in which they are defined.
A view can have as many as 200 to 400 columns, depending on the size of the 
column definitions. The column definitions for the view must fit in a file label.
A protection view and the underlying table must both be on the same volume and 
must both be described in the same catalog. If the table is partitioned, the 
protection view is partitioned, too, and each partition of the protection view is 
registered in the same catalog as the corresponding partition of the table.
You cannot insert data in a protection view unless the view includes all the columns 
of the underlying table that are defined with the NO DEFAULT option. In addition, if 
the table underlying the view is an entry-sequenced table or a key-sequenced table 
with a system-defined primary key, you cannot insert data in the view if the view 
definition includes the system-defined primary key column in the WHERE clause.
A protection view inherits the AUDIT attribute of the underlying table. The OWNER 
of a protection view is set to the owner of the underlying table.
The maximum number of protection views allowed on a table is approximately 180.
A shorthand view is audited if all referenced tables and views are audited. A 
shorthand view is nonaudited if all referenced tables and views are nonaudited. A 
shorthand view has a mixed audit classification if some of the referenced tables or 
views are audited and others are nonaudited, or if one of the referenced views has 
a mixed audit classification.
The OWNER of a shorthand view is set to the process accessor ID of the creating 
process.
A shorthand view that uses UNION cannot participate in a join. In addition, a 
SELECT on such a view cannot specify a GROUP BY or HAVING clause or 
include an aggregate function on any view column. A shorthand view based on an 
inner or outer join cannot become an inner table of an outer join.
There is no limit on the number of shorthand views allowed on a table.
A grouped view is a view defined with a SELECT that contains a GROUP BY or 
HAVING clause that is not in a subquery, contains an aggregate function in the 
select list, or contains another grouped view in the FROM clause.
A grouped view cannot be joined with any other table or view. A query on a 
grouped view cannot contain a GROUP BY or HAVING clause, nor can it specify 
an aggregate function on any columns of the grouped view.










