Generating Table Create SQL


File-AID for Db2 Object Administration generates SQL based on the attributes showing in the windows. The table editing windows must be displayed before you continue.

  1. Review your table editing windows.

    Your windows should look like the following figure before you continue.
    Completed Table Editing Windows. File-AID for Db2 Object Administration automatically generates the SQL based on the data currently showing in the definition windows.

    image2021-5-10_12-50-2.png

  2. Press <Go> to generate the SQL.

    File-AID for Db2 Object Administration opens the SQL work buffer. The buffer now contains the SQL to create the tablespace and the table. Scroll down to the CREATE TABLE statement (see the following figure). All statements are based on the information specified in the table editing windows. Continue to scroll and you see the PARTITION BY RANGE statement (Table SQL with PARTITION BY RANGE statement).

    SQL to Create a Table. Automatically generated SQL is appended to the SQL work buffer.

    image2021-5-10_12-50-59.png

    Table SQL with PARTITION BY RANGE statement

    image2021-5-10_12-51-36.png

    Do not execute the SQL yet. For these instructions, you execute the CREATE TABLE SQL at the same time you execute the CREATE INDEX SQL in Generating and Executing the SQL.

  3. Remove the SQL work buffer window.

    Pressing <End> leaves the SQL in the work buffer (providing the “Clear Work Buffers” value in your Window Display Parameter profile is set to No). Your screen should now look like Completed Table Editing Windows. File-AID for DB2 Object Administration automatically generates the SQL based on the data currently showing in the definition windows.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*