Customizing the SQL macro

By default, SQL-CREATE-VIEW moves elements referenced by the D3 macro into the SQL macro (i.e., the list of columns used when the * is specified for the SQL column list). Additional columns can be added to the SQL macro by specifying those attributes at the TCL prompt after the file reference.

For example, assume the macro for the file CUST is NAME ADDRESS PHONE. To create an SQL table that includes those attributes and an additional attribute AGE, use this statement:

SQL-CREATE-VIEW CUST AGE

The SQL table called CUST now has 4 columns, NAME, ADDRESS, PHONE and AGE.

If the c option is used, only the attributes specified on the command line are included in the table and its macro. Continuing with the example above,

The SQL table called CUST now has only 2 columns, NAME and AGE.