sp_iqcolumn Procedure

Displays information about columns in a database.

Syntax 1

sp_iqcolumn ( [ table_name ],[ table_owner ], [table_loc] )

Syntax 2

sp_iqcolumn [ table_name='table_name' ],[ table_owner='tableowner' ],[table_loc='table_loc’]

Parameters

Privileges

You must have EXECUTE privilege on the system procedure.

Remarks

Displays information about columns in a database. Specifying the table_name parameter returns the columns only from tables with that name. Specifying the table_owner parameter returns only tables owned by that user. Specifying both table_name and table_owner parameters chooses the columns from a unique table, if that table exists. Specifying table_loc returns only tables that are defined in that segment type. Specifying no parameters returns all columns for all tables in a database. sp_iqcolumn does not return column information for system tables.

Column Name Description
table_name The name of the table.
table_owner The owner of the table.
column_name The name of the column.
domain_name The data type.
width The precision of numeric data types that have precision and scale or the storage width of numeric data types without scale; the width of character data types.
scale The scale of numeric data types.
nulls 'Y' if the column can contain NULLS, 'N' if the column cannot contain NULLS.
default 'Identity/Autoincrement' if the column is an identity/autoincrement column, null if not.
cardinality The distinct count, if known, by indexes.
location TEMP = IQ temporary store, MAIN = IQ main store, SYSTEM = catalog store.
isPartitioned 'Y' if the column belongs to a partitioned table and has one or more partitions whose dbspace is different from the table partition’s dbspace, 'N' if the column’s table is not partitioned or each partition of the column resides in the same dbspace as the table partition.
remarks User comments added with the COMMENT statement.
check The check constraint expression.
Related reference
sp_iqconstraint Procedure
sp_iqdatatype Procedure
sp_iqevent Procedure
sp_iqhelp Procedure
sp_iqindex and sp_iqindex_alt Procedures
sp_iqpkeys Procedure
sp_iqprocparm Procedure
sp_iq_reset_identity Procedure
sp_iqtable Procedure
sp_iqview Procedure
Determining the Security Model Used by a Database