SQLSPECIALCOLUMNS

The SQLSPECIALCOLUMNS view contains one row for every column of a primary key, unique constraint, or unique index that can identify a row of the table.

The following table describes the columns in the view:

Table 1. SQLSPECIALCOLUMNS view
Column Name Data Type Description
SCOPE SMALLINT Reserved. Contains 0.
COLUMN_NAME VARCHAR(128) Column name
DATA_TYPE SMALLINT The data type of the column:
–5
BIGINT
4
INTEGER
5
SMALLINT
3
DECIMAL
2
NUMERIC
8
DOUBLE PRECISION
7
REAL
-360
DECFLOAT
1
CHARACTER
–2
CHARACTER FOR BIT DATA
12
VARCHAR
–3
VARCHAR FOR BIT DATA
40
CLOB
–95
GRAPHIC
–96
VARGRAPHIC
–350
DBCLOB
–2
BINARY
–3
VARBINARY
30
BLOB
91
DATE
92
TIME
93
TIMESTAMP
70
DATALINK
–100
ROWID
17
DISTINCT
TYPE_NAME VARCHAR(260) The name of the data type of the column.
COLUMN_SIZE INTEGER The length of the column.
BUFFER_LENGTH INTEGER Indicates the length of the column in a buffer.
DECIMAL_DIGITS SMALLINT

Nullable

Indicates the number of digits for a numeric column.

Contains the null value if the column is not numeric.

PSEUDO_COLUMN SMALLINT Indicates whether this is a ROWID, identity, or row change timestamp column.
1
The column is not a ROWID, identity, or row change timestamp column.
2
The column is a ROWID, identity, or row change timestamp column.
TABLE_CAT VARCHAR(128) Relational database name
TABLE_SCHEM VARCHAR(128) Name of the SQL schema that contains the table.
TABLE_NAME VARCHAR(128) Name of the table.
NULLABLE SMALLINT Indicates whether the column can contain the null value.
0
The column is not nullable.
1
The column is nullable.
JDBC_DATA_TYPE SMALLINT Indicates the JDBC data type of the column.
–5
BIGINT
4
INTEGER
5
SMALLINT
3
DECIMAL
2
NUMERIC
8
DOUBLE PRECISION
7
REAL
1111
DECFLOAT
1
CHARACTER
–2
CHARACTER FOR BIT DATA
12
VARCHAR
–3
VARCHAR FOR BIT DATA
2005
CLOB
1
GRAPHIC
12
VARGRAPHIC
2005
DBCLOB
–2
BINARY
–3
VARBINARY
2004
BLOB
91
DATE
92
TIME
93
TIMESTAMP
70
DATALINK
1111
ROWID
Start of change2009End of change
Start of changeXMLEnd of change
2001
DISTINCT
I_DATA_TYPE SMALLINT Indicates the IBM® i CLI data type of the column.
19
BIGINT
4
INTEGER
5
SMALLINT
3
DECIMAL
2
NUMERIC
8
DOUBLE PRECISION
7
REAL
-360
DECFLOAT
1
CHARACTER
–2
CHARACTER FOR BIT DATA
12
VARCHAR
–3
VARCHAR FOR BIT DATA
14
CLOB
95
GRAPHIC
96
VARGRAPHIC
15
DBCLOB
–2
BINARY
–3
VARBINARY
13
BLOB
91
DATE
92
TIME
93
TIMESTAMP
16
DATALINK
1111
ROWID
Start of change-370End of change
Start of changeXMLEnd of change
2001
DISTINCT