Direct control of system names for tables, views and indexes
The FOR SYSTEM NAME clause directly defines the system name for these objects, eliminating the need to execute a RENAME after the object is created to replace the system generated name.
The name provided in the FOR SYSTEM NAME clause must be a valid system name and cannot be qualified. The first name provided for the object cannot be a valid system name.
The optional FOR SYSTEM NAME clause has been added to these SQL statements:
- CREATE TABLE
- CREATE VIEW
- CREATE INDEX
- DECLARE GLOBAL TEMPORARY TABLE
Use the FOR SYSTEM NAME clause to achieve direct control over table, view and index system names, making it simpler to manage the database.
This support eliminates the need to use the RENAME SQL statement or the Rename Object (RNMOBJ) command after object creation.
Additionally, the Generate SQL / QSQGNDDL() interface will leverage this enhancement to produce SQL DDL scripts that produce identical object names. When QSQGNDDL() is called using the System_Name_Option = '1', whenever the table, view or index objects has a system name which differs from the SQL name, the FOR SYSTEM NAME clause will be generated. For IBM i Navigator users, you control the System Name Option by selecting the "System names for objects" option.
FOR SYSTEM NAME COMP_12_11
Was this topic helpful?
14 January 2020