Variables for Indexes and Index Columns

PowerDesigner can use variables in the generation and reverse-engineering of indexes and index columns.

The following variables are available for indexes:

Variable

Comment

%INDEX%

Generated code of index

%TABLE%

Generated code of the parent of an index, can be a table or a query table (view)

%INDEXNAME%

Index name

%INDEXCODE%

Index code

%UNIQUE%

Contains Keyword "unique" when index is unique

%INDEXTYPE%

Contains index type (available only for a few DBMS)

%CIDXLIST%

List of index columns with separator, on the same line. Example: A asc, B desc, C asc

%INDEXKEY%

Contains keywords "primary", "unique" or "foreign" depending on index origin

%CLUSTER%

Contains keyword "cluster" when index is cluster

%INDXDEFN%

Used for defining an index within a table definition

The following variables are available for index columns:

Variable

Comment

%ASC%

Contains keywords "ASC" or "DESC" depending on sort order

%ISASC%

TRUE if index column sort is ascending