Creating the table definition


Execute the CR (create) row command next to EMP.

Two windows open with attributes acquired from the existing table (see the following figure):

  • Edit Create Table Information (outer window): Specifies table attributes.
  • Edit Columns (inner window): Specifies attributes for the table’s columns.

    Collectively, these windows are called the table editing windows. You can use any edit row or primary command to change attributes to create a new table definition. A few fields are protected from change, as indicated by a different color on your screen.

    Inner windows cannot be closed individually. Only the outer window can be closed.

Each object in the Db2 catalog has a similar set of editing windows which you can access with the CR row command. Later in this section, you’ll access the index editing window.

Many of these object editing windows have special commands. The outer table editing window, for example, has a CALC primary command for calculating space requirements for your new table. Also, you can use the CONSTRAINTS primary command to define unique, referential, and column constraints. Most of the object editing windows also have ALTER, CREATE, and DROP available.

Table Editing Windows

image2021-5-10_11-29-59.png

 

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