SQL/MX 2.x Installation and Management Guide (H06.10+, J06.03+)
Adding, Altering, and Dropping SQL/MX Database
Objects
HP NonStop SQL/MX Installation and Management Guide—544536-007
9-17
Adding Views
For more information and examples of creating triggers, see Creating Triggers on
page 7-41.
Adding Views
To add a view, use the CREATE VIEW statement.
Steps for Adding a View
1. Start an MXCI session. Enter a LOG command to initiate a log file for statements
and commands entered in this session. Keep the log for your records.
2. Determine the names of any tables whose columns you want to include in the
view., and a name for the view you want to add.
3. Query the system metadata to ensure the new view name is unique among
existing view, table, SQL/MP alias and SPJ names in the schema.
4. Determine the column names of the view and the column names of the underlying
table or tables of the view. To display the columns of the underlying table or tables,
you can use MXCI as described in Displaying the Attributes of a Column on
page 8-54.
5. Enter the CREATE VIEW statement.
6. Use the GRANT statement to set access privileges for the new view, if necessary.
7. Make a new TMF online dump containing the view.
For more information and examples of creating views, see Creating Views of SQL/MX
Tables on page 7-39 and the SQL/MX Reference Manual.










