Variables for Tables and Views

PowerDesigner can use variables in the generation and reverse-engineering of tables and views.

The following variables are available for tables:

Variable

Comment

%TABLE%

Generated code of Table

%TNAME%

Name of Table

%TCODE%

Code of Table

%TLABL%

Comment of Table

%PKEYCOLUMNS%

List of primary key columns. Ex: A, B

%TABLDEFN%

Complete body of Table definition. It contains definition of columns, checks and keys

%CLASS%

Abstract data type name

%CLASSOWNER%

Owner of the class object

%CLASSQUALIFIER%

Qualifier of the class object

%CLUSTERCOLUMNS%

List of columns used for a cluster

%INDXDEFN%

Table indexes definition

%TABLTYPE%

Table type

The following variables are available for views:

Variable

Comment

%VIEW%

Generated code of View

%VIEWNAME%

View name

%VIEWCODE%

View code

%VIEWCOLN%

List of columns of View. Ex: "A, B, C"

%SQL%

SQL text of View. Ex: Select * from T1

%VIEWCHECK%

Contains Keyword "with check option" if this option is selected in View

%SCRIPT%

Complete view creation order. Ex: create view V1 as select * from T1

%VIEWSTYLE%

Style of view: view, snapshot, materialized view

%ISVIEW%

True is it is a view (and not a snapshot)

%USAGE%

Read-only=0, Updatable=1, Check option=2

The following variables are available for tables and views:

Variable

Comment

%XMLELEMENT%

Element contained in the XML schema

%XMLSCHEMA%

XML schema