Online Documentation for SQL Manager for DB2

Creating/editing SQL variable


Use the Edit tab of SQL Variable Editor to create/edit a SQL variable and specify its definition.

 

SQL Variable Editor - Editing SQL Variable definition

 

 

Schema

Use the drop-down list to select the schema for the new SQL variable.

 

Name

Indicates the SQL variable name.

 

RadioButton Built-in type

Specifies a built-in data type (note that CLOB, DBCLOB, BLOB, LONG VARCHAR, LONG VARGRAPHIC, XML, ARRAY, or structured types cannot be specified for global variables).

 

Data type

Specify the data type of the global variable.

 

CheckBox For bit data

Can be specified as part of character string data types.

 

RadioButton Distinct type

Specifies a distinct type. The length, precision, and scale of the global variable are, respectively, the length, precision, and scale of the source of the distinct type. Then select the Distinct type schema and Distinct type name.

 

RadioButton Ref using

Specifies a reference type. The length, precision, and scale of the global variable are, respectively, the length, precision, and scale of the source of the reference type. Then select the Reference type schema and Reference type name.

 

 

Default value

Specifies a default value for the global variable. The value can be:

RadioButton NULL

RadioButton global variable (select one from the drop-down list)

RadioButton expression (specify one in the editable area)