Difference between revisions of "SYSCOLUMNS"

From Recital Documentation Wiki
Jump to: navigation, search
 
(2 intermediate revisions by one user not shown)
Line 1: Line 1:
=SYSCOLUMNS=
 
 
 
==Class==
 
SQL Applications
 
 
 
 
==Purpose==
 
==Purpose==
 
Description of the table columns available in the catalog
 
Description of the table columns available in the catalog
Line 62: Line 55:
 
==Example==
 
==Example==
 
<code lang="recital">
 
<code lang="recital">
EXEC SQL
+
SELECT * FROM syscolumns;
SELECT *
+
WHERE type_name = 'DATETIME'
FROM syscolumns
+
WHERE type_name = ’DATETIME’;
+
 
</code>
 
</code>
  
  
 
==Products==
 
==Products==
Recital Database Server, Recital Mirage Server, Recital Terminal Developer
+
Recital, Recital Server
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:SQL]]
 
[[Category:SQL]]
 
[[Category:System Tables]]
 
[[Category:System Tables]]

Latest revision as of 16:46, 22 December 2009

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

SELECT * FROM syscolumns;
WHERE type_name = 'DATETIME'


Products

Recital, Recital Server