Generating SQL statements


File-AID for Db2 Object Administration quickly generates SQL statements based on existing objects or defaults from your user profile. This section shows you how to create a table and a primary index based on attributes acquired from a similar object. The steps require you to first display a definition for a similar object. You then edit the attributes and rename the definition. File-AID for Db2 Object Administration generates the DDL from this new definition. This process of creating can be used for the following objects:

  • Aliases
  • Databases
  • Indexes
  • Storage groups
  • Synonyms
  • Tables
  • Tablespaces
  • Triggers
  • Views.

Other methods can be used to create objects, as discussed in More about Creating Objects.

When you finish this section, you’ll have a new table named EMPTEST and a new index named XEMPTEST1. You’ll use EMPTEST in the next section to grant and revoke privileges.

 

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