|
SQL | System Tables |
SELECT
can
be used to retrieve information from these in the same manner as from any other
table or view though the menus can be used to access much of the same information
in a more convenient manner.
As an example of using these tables, the following three SELECTs
use the $REC system
view which describes records. The first query retrieves all the information
about each record in the default database; the second retrieves all the
information about each record in the COMPANY
database;
the third retrieves all the information about the OCCUP
record
in the COMPANY
database.
SELECT * FROM $REC SELECT * FROM COMPANY.$REC SELECT * FROM COMPANY.$REC WHERE RECNAME EQ 'OCCUP'Most of the system tables are views. That is, they are not physical tables but are representations of the data presented by SQL as tables.
FROM
clause of the
SELECT
statement as: [database.]viewname$PASSWORD, $SECURITY
and $VALUE_LABEL
are
tables; all the others are views. The tabfile views and tables can be
referenced on the FROM
clause of the SELECT
as: [tabfile.] viewname
TABFILE
TABLE
VARNAME
VARTYPE
VARLEN
VARLABEL
SCALE
BIAS
NRANGES
MAP
DECIMAL
FILL
LZERO
LNEG
LPOS
MISSING
NULL
FORMAT
SEPARATOR
THOUSANDS
TNEG
TPOS
VALLABS
ZERO
DBNAME
UPLEVEL
CASEID
CASEIDOR
CASEID
order (ascending or descending).CASEIDTY
CASEID
variable type.NCASES
NRECS
NTEMPS
NVARS
MAXCASES
MAXRECS
MAXRECTY
RECNUM
RECNAME
LINENUM
LINE
DBNAME
UPLEVEL
CREDATE
CRETIME
CHNGDATE
CHNGTIME
NCASES
NRECS
NVARS
NTEMPS
AVGRECS
CASEIDSZ
CIRLEN
KEYSIZE
ACTDATB
INADATB
DATBLKSZ
MINDATSZ
MAXDATSZ
ACTINDB
INAINDB
INDBLKSZ
INDEXLEN
MAXINENT
MAXRECVR
TABFILE
TABLE
INDEX
TABFILE
TABLE
INDEX
COL
GRPNAME
USERNAME
RECNUM
RECNAME
COUNT
IDCNT
LENGTH
LOCK
MAX
VARCNT
GRPNAME
USERNAME
TABLE
COLADD
TABFILECONNECT
TABCREATE
DBA
COLDELETE
ROWDELETE
TABLEDROP
INDEXCREATE
ROWADD
COLMOD
SELECT
ROWMOD
GRANTERGRPNAME
GRANTERUSERNAME
COLPERM
RECNUMB
RECNAME
VARNAME
ORDER
TYPE
TABFILE
TABLE
UPLEVEL
DATECREATE
TIMECREATE
DATEUPDATE
TIMEUPDATE
NROWS
NCOL
NINDEX
MAXROWS
LENGTH
NBLOCKS
NROWDELETE
PADDING
TABFILE
DATECREATE
TIMECREATE
DATEUPDATE
TIMEUPDATE
NTABLES
TABFILELDI
BLOCKSZ
JOURNAL
TABFILE
TABLE
VARNAME
RANGETYPE
LOW
HIGH
RECNUM
RECNAME
VARNAME
NVAL
SVAL
LABEL
TABLE
VARNAME
NVALUE
SVALUE
LABEL
MVALUE
REFCOUNT
RECNUM
RECNAME
VARNAME
NVAL
SVAL
RECNUM
RECNAME
VARNAME
LABEL
TYPE
LENGTH
NMIN
NMAX
SMIN
SMAX
MISS
NMISS1
NMISS2
NMISS3
SMISS1
SMISS2
SMISS3
MAP
SCALE
VALLABS
VVALS
RECNUM
RECNAME
VARNAME
LINENO
LABEL
TYPE_NAME
DATA_TYPE
PRECISION
LITERAL_PREFIX
LITERAL_SUFFIX
CREATE_PARAMS
NULLABLE
CASE_SENSITIVE
SEARCHABLE
UNSIGNED_ATTRIBUTE
MONEY
AUTO_INCREMENT
LOCAL_TYPE_NAME
MINIMUM_SCALE
MAXIMUM_SCALE
TYPE_NAME DATA_TYPE PRECISION LITERAL_PREFIX LITERAL_SUFFIX CREATE_PARAMS NULLABLE CASE_SENSITIVE SEARCHABLE UNSIGNED_ATTRIBUTE MONEY AUTO_INCREMENT
---------- --------- --------- -------------- -------------- --------------- -------- -------------- ---------- ------------------ -------- --------------
TINYINT -6 3 ' '
CHARACTER 1 254 ' ' length 1 1 4 0 0 0
NUMERIC 2 15 ' ' length
NUMERIC 3 15 ' ' length,decimal 1 0 3 0 0 0
INT 4 10 ' ' length,decimal 1 0 3 0 0 0
SMALLINT 5 15 ' ' length,decimal
FLOAT 6 15 ' ' length,decimal
REAL 7 7 ' ' length,decimal
DOUBLE 8 15 ' ' length,decimal
DATE 9 10 ' ' length 1 0 3 1 0 0
TIME 10 8 ' ' 'date_map' 1 0 3 1 0 0
CHARACTER 12 254 ' ' length 1 1 4 1 0 0
This table exists primarily for ODBC clients that may request this information.