NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
C-41
COLUMNS Table
name of the table or view that contains the column as a qualifier, but you must omit the
equals sign (=) that normally precedes the DEFINE name.
You must also refer to a column by a qualified column name if you join a table with
itself within a query in order to compare one row of the table with other rows in the
same table.
COLUMNS Table
The COLUMNS table is a catalog table that describes the columns of the tables in the
TABLES catalog table. The following table describes the contents of the COLUMNS
table.
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 Tandem
software
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
* Indicates primary key