Direct control of system names for tables, views and indexes
Page 1 of 1
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.
Examples:
CREATE OR REPLACE VIEW
PRODLIB/COMPARE_YEARS_2012_AND_2011
FOR SYSTEM NAME COMP_12_11
AS SELECT …
COMP_12_11 *FILE object created instead of COMPA00001, COMPA00002, etc…
CREATE TABLE CUSTOMER_SALES FOR SYSTEM NAME SALES (CUSTNO BIGINT…
Generates a table with a system name of SALES, rather than a generated name of CUSTO00001.
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.
Examples:
CREATE OR REPLACE VIEW
PRODLIB/COMPARE_YEARS_2012_AND_2011
FOR SYSTEM NAME COMP_12_11
AS SELECT …
COMP_12_11 *FILE object created instead of COMPA00001, COMPA00002, etc…
CREATE TABLE CUSTOMER_SALES FOR SYSTEM NAME SALES (CUSTNO BIGINT…
Generates a table with a system name of SALES, rather than a generated name of CUSTO00001.
Similar topics
» System Monitoring - Checklist, to keep it under our control
» What is High Speed Tables? Diff between normal file and High speed tables?
» Where are the Condition names and values stored within the model?
» journal & Commitment Control
» How to use commitment control in SYNON?
» What is High Speed Tables? Diff between normal file and High speed tables?
» Where are the Condition names and values stored within the model?
» journal & Commitment Control
» How to use commitment control in SYNON?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum