SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)

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” (page 143).
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, see “Creating Views of SQL/MX Tables” (page 101) and the SQL/MX
Reference Manual.
Altering Objects in an SQL/MX Database
Table 10 (page 162) summarizes the database objects that you can alter and identifies the statements,
commands, or utilities to use.
Table 10 Altering Objects in an SQL/MX Database
Statement, Command or UtilityOperationObject
ALTER INDEX statement FIXUP utilityChange attributesIndex
MODIFY utility
nl
Add partition
nl
Partition
MODIFY utility
nl
Drop partition
nl
MODIFY utility
nl
Reuse partition
nl
MODIFY utilityMove partition
ALTER SEQUENCE statementChange attributes
nl
Sequence Generator
(increment by,
nl
restart with,
nl
maxvalue,
nl
minvalue,
nl
cycle)
MODIFY utilityMove partition
GRANT statement
nl
Grant privilege
GRANT USAGE statement
REVOKE statement
nl
Revoke privilege
REVOKE USAGE statement
GRANT statement
nl
Grant privilegeStored procedure in Java (SPJ)
GRANT EXECUTE statement
REVOKE statement
nl
Revoke privilege
REVOKE EXECUTE statement
ALTER SQLMP ALIAS statementRemapSQL/MP alias
See “Reviewing and Setting System Defaults”
(page 68)
Changing attribute settingsSystem Default
ALTER TABLE statement FIXUP utility
nl
Change attributes
nl
Table
ALTER TABLE statement
nl
Add column
nl
ALTER TABLE statement
nl
Add constraint
nl
ALTER TABLE statement
nl
Drop constraint
nl
GRANT statement
nl
Grant privileges
nl
162 Adding, Altering, and Dropping SQL/MX Database Objects