SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
C-46
COLUMNS Table
COLUMNS Table
The COLUMNS table is a catalog table that describes the columns of the tables in the
TABLES catalog table. Table C-3 describes the contents of the COLUMNS table.
Table C-3. The COLUMNS Table (page 1 of 2)
Column Name Data Type Description
1 TABLENAME * CHAR(34) Name of table that contains the column
2 COLNUMBER * SMALLINT
UNSIGNED
Position of column in row (first column is
0)
3 COLNAME CHAR(30) Column name
4 COLCLASS CHAR(1) S if SYSKEY
U if user-defined column
5 DATATYPE CHAR(18) Data type of column
DATETIME for all date-time types
FLOAT for all real types
6 FSDATATYPE SMALLINT
SIGNED
File system data type of column (system
use only)
7 COLSIZE SMALLINT
SIGNED
Byte length of data in column
8 SCALE SMALLINT
SIGNED
Scale factor if column is numeric;
fractional seconds precision if column is
date-time or INTERVAL
9 PRECISION SMALLINT
SIGNED
Number of digits if column is numeric;
number of digits of binary precision if
column is FLOAT; leading field precision
if column is INTERVAL
10 OFFSET SMALLINT
SIGNED
Reserved for internal use by HP
11 UNIQUEENTRYCOUNT LARGEINT
SIGNED
Number of unique entries in column for
table; set by UPDATE STATISTICS
12 SECONDHIGHVALUE VARCHAR(20) First 20 bytes of second-highest value in
column (ignoring nulls); stores numerics
in ASCII with an appropriate scale (for
example, stores –50,000 as
–50 scale 3); date-time items use local
civil time; set by UPDATE STATISTICS
13 SECONDLOWVALUE VARCHAR(20) First 20 bytes of second-lowest value in
column (ignoring nulls); stored as for
SECONDHIGHVALUE; set by UPDATE
STATISTICS
14 NULLALLOWED CHAR(1) Y if null values allowed
N if not