Difference between revisions of "SYSCOLUMNS"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 11: Line 11:
  
 
==See Also==
 
==See Also==
[[DATA TYPES]], [[SQL SELECT|SELECT]], [[SYSTEM TABLES]]
+
[[SQL Data Types|DATA TYPES]], [[SQL SELECT|SELECT]], [[SQL System Tables|SYSTEM TABLES]]
  
  

Revision as of 15:57, 13 March 2009

SYSCOLUMNS

Class

SQL Applications


Purpose

Description of the table columns available in the catalog


See Also

DATA TYPES, SELECT, SYSTEM TABLES


Description

System Tables are system defined read-only tables. You can query these tables using the SELECT statement.


Column Data Type Width Description
TABLE_CAT C 30 Table catalog
TABLE_SCHEM C 30 Table schema
TABLE_NAME C 30 Table name
COLUMN_NAME C 25 Column name
DATA_TYPE N 2 SQL data type
TYPE_NAME C 30 Data source dependent type name
COLUMN_SIZE N 3 Precision
BUFFER_LENGTH L 1 Reserved
DECIMAL_DIGITS N 2 Scale
NUM_PREC_RADIX N 2 Radix (typically either 10 or 2)
NULLABLE N 2 Is NULL allowed?
REMARKS C 25 Comment describing column
COLUMN_DEF C 30 Default value
SQL_DATA_TYPE N 1 Reserved
SQL_DATETIME_SUB N 1 Reserved
CHAR_OCTET_LENGTH N 1 For char types the maximum number of bytes in the column
ORDINAL_POSITION N 4 Index of column in table (starting at 1)
IS_NULLABLE C 3 "NO" means column definitely does not allow NULL values; "YES" means the column might allow NULL values. An empty string means unknown.


Example

EXEC SQL
SELECT *
FROM syscolumns
WHERE type_name =DATETIME;


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer