Copying column definitions

 

Copying column definitions saves you from defining columns in multiple tables by sharing the same definitions across the tables. In this example, the ITEM_NUMBER column in the SUPPLIERS table shares the definition of the ITEM_NUMBER column in the INVENTORY_LIST table. To copy column definitions, follow these steps:

  1. In the SUPPLIERS Table Properties or the New Table window, click Browse.

  2. In the Browse Tables window, expand SAMPLELIB.

  3. Click INVENTORY_LIST. The columns in this table are listed, along with their data types, sizes, and descriptions.

  4. Select ITEM_NUMBER.

  5. Click Add to copy this column definition to the SUPPLIERS table.

  6. Close the Browse Columns window.
You can then add the following additional columns to the SUPPLIERS table.

Column name Type Length Precision Scale Nullable Default value
SUPPLIER_NUMBER CHAR 4     No 0
SUPPLIER_COST DECIMAL   8 2 Yes NULL

 

Parent topic:

Creating a table and defining a column