Rexx/SQL

A Rexx interface to SQL databases

Version 2.5

10 October 2006


SQLCOLUMNS(stem name,qualifier name,owner name,table name,table type)

Obtains a list of the columns in tables in the current database. There must be an open connection for the database. The list of column names is returned as a compound variable in the stem name

Arguments:

stem name
A stem that will contain the list of tables.

table qualifier
An optional string value specifying the table qualifier. You can use standard SQL wildcard characters in the string on some platforms.

table owner
An optional string value specifying the table owner. You can use standard SQL wildcard characters in the string on some platforms.

table name
An optional string value specifying the table name. You can use standard SQL wildcard characters in the string on some platforms.

table type
An optional string value specifying the table type. The table type can be an empty string, which will result in all types of database objects being returned, or or you can use various values like TABLE, VIEW or SYSTEM TABLE. On some platforms a combination of the values separated by commas (,) can be specified.

Returns:
success: a number >= zero.
a value of zero indicates success.

failure: a negative number
Stem variable names:
stem-name.TABLE_CATALOG.n
Table qualifier
stem-name.TABLE_OWNER.n
Table owner
stem-name.TABLE_NAME.n
Table name
stem-name.COLUMN_NAME.n
Column name
stem-name.COLUMN_TYPE.n
Data type name for the column
stem-name.COLUMN_SIZE.n
Display size of column
stem-name.COLUMN_PRECISION.n
Precision of decimal column
stem-name.COLUMN_SCALE.n
Decimal scale factor
stem-name.COLUMN_NULLABLE.n
Column nullable flag
stem-name.COLUMN_DESCRIPTION.n
Column description


Copyright © Mark Hessling 1997-2006 <mark@rexx.org>


Return to Table of Contents
Last updated 10 October 2006