SQL Ref
SQL Ref
Reference
Version 7.1
December 1994
Part No. 000-7632
The following are worldwide trademarks of Informix Software, Inc., or its subsidiaries, registered in the
United States of America as indicated by an , and in numerous other countries worldwide:
INFORMIX; C-ISAM
The following are worldwide trademarks of the indicated owners or their subsidiaries, registered in the
United States of America as indicated by an , and in numerous other countries worldwide:
X/Open Company Ltd.: UNIX; X/Open
Adobe Systems Incorporated: PostScript
Micro Focus Ltd.: Micro Focus; Micro Focus COBOL/2
Some of the products or services mentioned in this document are provided by companies other than Informix.
These products or services are identified by the trademark or servicemark of the appropriate companies. If you
have a question about one of these products or services, please contact the company in question directly.
Documentation Team:
Sally Cox, Mary Kraemer, Geeta Karmarkar, Steve Klitzing, Catherine Lyman,
Judith Sherwood, Eileen Wollam
ii
Preface
Preface
iii
Summary of Chapters
Summary of Chapters
The Informix Guide to SQL: Reference includes the following chapters:
iv
This Preface provides general information about the manual and lists
additional reference materials that will help you understand Structured Query Language (SQL) concepts.
The Introduction describes the Informix family of products and manuals, explains how to use this manual, introduces the demonstration
database from which the product examples are drawn, and lists the
new features for Version 7.1 of Informix database server products.
Chapter 4, Environment Variables, describes the various environment variables that you can or should set to properly use your Informix products. These variables identify your terminal, specify the
location of your software, and define other parameters of your product environment.
Chapter 5, SQL Utilities, contains the syntax and usage of the user
utilities. These utilities allow you to import and export data to your
databases, load files, and perform other tasks.
Related Reading
If you want additional technical information on database management,
consult the following books. The first book is an introductory text for readers
who are new to database management, while the second book is a more complex technical work for SQL programmers and database administrators.
Preface
Related Reading
If you are interested in learning more about the SQL language, consider the
following books:
A Guide to the SQL Standard by C.J. Date with H. Darwen (AddisonWesley Publishing, 1993)
This manual assumes that you are familiar with your computer operating
system. If you have limited UNIX system experience, you might want to look
at your operating system manual or a good introductory text before you read
this manual. Some texts about UNIX systems are suggested in the following
list:
1985)
Publishing, 1995)
vi
Table of
Contents
Table of Contents
Introduction
Chapter 1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
5
6
9
10
10
.
.
.
.
.
.
11
12
14
14
.
.
.
.
.
.
.
1-3
1-4
1-5
1-5
1-5
1-6
1-7
Informix Databases
Choosing a Database Server . . . . . .
Data Types . . . . . . . . . .
Rolling Back Statements in a Transaction
Transaction Logging . . . . . . .
Table and Index Fragmentation . . .
Locking Issues . . . . . . . . .
Isolation Level . . . . . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
Chapter 2
viii
1-8
1-8
1-10
1-16
1-18
1-22
1-12
1-22
System Catalog
Objects Tracked by the System Catalog Table .
2-3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2-4
2-10
2-11
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2-12
2-13
2-14
2-15
2-16
2-17
2-20
2-22
2-23
2-24
2-25
2-26
2-29
2-31
2-32
2-33
2-34
2-35
2-36
2-36
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
SYSTABAUTH
SYSTABLES .
SYSTRIGBODY
SYSTRIGGERS
SYSUSERS . .
SYSVIEWS . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2-38
2-39
2-42
2-43
2-44
2-44
2-45
Information Schema . . . . . . . . . . . .
Generating the Information Schema Views. . .
Accessing the Information Schema Views . . .
Structure of the Information Schema Views . .
2-47
2-47
2-48
2-48
Chapter 3
.
.
.
.
.
.
Data Types
Database Data Types . . . .
Effects of NLS. . . . . .
Summary of Data Types . .
BYTE. . . . . . . . .
CHAR(n) . . . . . . .
CHARACTER(n) . . . .
CHARACTER VARYING(m,r)
DATE . . . . . . . .
DATETIME . . . . . .
DEC . . . . . . . . .
DECIMAL . . . . . . .
DOUBLE PRECISION . . .
FLOAT(n) . . . . . . .
INT . . . . . . . . .
INTEGER . . . . . . .
INTERVAL. . . . . . .
MONEY(p,s) . . . . . .
NCHAR(n) . . . . . .
NUMERIC(p,s) . . . . .
NVARCHAR(m,r) . . . .
REAL . . . . . . . .
SERIAL(n) . . . . . . .
SMALLFLOAT . . . . .
SMALLINT . . . . . .
TEXT. . . . . . . . .
VARCHAR(m,r) . . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3-3
3-3
3-4
3-5
3-6
3-7
3-8
3-9
3-9
3-12
3-13
3-15
3-15
3-15
3-16
3-16
3-19
3-20
3-21
3-21
3-23
3-23
3-24
3-24
3-25
3-26
Table of Contents
ix
Chapter 4
3-30
3-32
3-33
3-34
3-36
3-36
Environment Variables
Types of Environment Variables .
3-28
3-28
3-29
3-30
4-5
4-6
4-6
. .
. .
4-6
4-7
.
.
.
.
.
.
.
.
.
.
.
.
4-8
4-8
4-9
4-9
4-9
Rules of Precedence .
4-10
4-11
4-11
4-11
4-12
Environment Variables . .
ARC_DEFAULT . . .
ARC_KEYPAD . . .
COLLCHAR . . . .
DBANSIWARN . . .
DBAPICODE . . . .
DBBLOBBUF . . . .
DBDATE . . . . .
DBDELIMITER . . .
DBEDIT. . . . . .
DBLANG . . . . .
DBMONEY . . . .
DBNLS . . . . . .
DBPATH . . . . .
DBPRINT . . . . .
DBREMOTECMD . .
DBSPACETEMP . . .
DBTEMP . . . . .
DBTIME . . . . .
DBUPSPACE . . . .
DELIMIDENT . . .
ENVIGNORE . . . .
FET_BUF_SIZE . . .
INFORMIXC . . . .
INFORMIXCOB . . .
INFORMIXCOBDIR .
INFORMIXCOBSTORE
INFORMIXCOBTYPE .
INFORMIXCONRETRY
INFORMIXCONTIME.
INFORMIXDIR . . .
INFORMIXSERVER .
INFORMIXSHMBASE.
INFORMIXSTACKSIZE
INFORMIXTERM . .
LANG . . . . . .
LC_COLLATE . . .
LC_CTYPE. . . . .
LC_MONETARY . .
LC_NUMERIC . . .
LC_TIME . . . . .
ONCONFIG . . . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4-15
4-15
4-15
4-16
4-18
4-19
4-20
4-21
4-23
4-23
4-24
4-25
4-26
4-28
4-31
4-32
4-33
4-34
4-34
4-37
4-38
4-38
4-39
4-40
4-40
4-41
4-42
4-43
4-43
4-44
4-46
4-46
4-47
4-48
4-49
4-49
4-51
4-53
4-55
4-56
4-57
4-59
Table of Contents
xi
OPTCOMPIND .
PATH . . . . .
PDQPRIORITY .
PSORT_DBTEMP .
PSORT_NPROCS .
SQLEXEC . . .
SQLRM . . . .
SQLRMDIR . . .
TERM . . . . .
TERMCAP . . .
TERMINFO . . .
Chapter 5
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4-59
4-60
4-61
4-62
4-63
4-64
4-65
4-65
4-66
4-66
4-67
4-68
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5-4
.
.
.
.
.
.
.
.
.
.
.
.
5-5
5-5
5-9
5-10
5-14
SQL Utilities
The chkenv Utility
xii
.
.
.
.
.
.
.
.
.
.
.
5-15
.
.
.
.
.
.
.
.
.
.
.
.
5-16
5-21
5-22
5-23
5-25
5-29
5-40
5-42
5-47
Appendix A
2
2
3
4
4
5
6
6
7
7
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
9
9
10
11
12
13
14
15
16
16
Glossary
Index
Table of Contents
xiii
Introduction
Introduction
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5
5
6
8
10
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
11
12
14
14
Introduction
The SQL Quick Syntax Guide contains syntax diagrams for all statements and segments described in this manual.
Depending on the database server you are using, you or your system
administrator need either the INFORMIX-SE Administrators Guide or
the INFORMIX-OnLine Dynamic Server Administrators Guide.
When errors occur, you can look them up by number and learn their
cause and solution in the Informix Error Messages manual. If you prefer, you can look up the error messages in the on-line message file
described in the section ASCII and PostScript Error Message Files
later in this Introduction and in the Introduction to the Informix Error
Messages manual.
Typographical Conventions
Informix product manuals use a standard set of conventions to introduce
new terms, illustrate screen displays, describe command syntax, and so on.
The following typographical conventions are used throughout this manual:
italics
boldface
Introduction
Command-Line Conventions
computer
KEYWORD
Additionally, when you are instructed to enter or execute text, immediately press RETURN after the entry. When you are instructed to type the text
or press a key, no RETURN is required.
Command-Line Conventions
This section defines and illustrates the format of the commands available in
Informix products. These commands have their own conventions, which
may include alternative forms of a command, required and optional parts of
the command, and so on.
Each diagram displays the sequences of required and optional elements that
are valid in a command. A diagram begins at the upper left with a command.
It ends at the upper right with a vertical line. Between these points, you can
trace any path that does not stop or back up. Each path describes a valid form
of the command. You must supply a value for words that are in italics.
6
Command-Line Conventions
variable
-flag
.ext
(.,;+*-/)
' '
Privileges
p. XXX
ALL
Command-Line Conventions
IN
NOT
,
variable
column
key
Figure 1 shows how to read the command-line diagram for setting the
DBMONEY environment variable in a C shell:
Figure 1
Elements of a command-line diagram
setenv
DBMONEY
'$'
front
back
To construct a correct command, start at the top left with the command
setenv. Then follow the diagram to the right, including the elements that you
want. The elements in the diagram are case-sensitive. This diagram conveys
the following information:
1.
2.
3.
4.
You must choose either the period or comma as the symbol that separates the integral from the fractional part of the money value.
5.
6.
After your back option choice, you come to the terminator. Your
setenv command is complete. Press RETURN to execute the
command.
As shown in the following example, you can set the DBMONEY environment
variable for Canadian currency using the string $CAN for front, using the
period as the separator, and omitting the back option:
setenv DBMONEY '$CAN'.
Introduction
Release Notes
Machine Notes
Please examine these files because they contain vital information about
application and performance issues.
10
You can use letters, characters, and underscores (_) for the rest of the
name.
letters.
When you run dbaccessdemo7, you are, as the creator of the database, the
owner and Database Administrator (DBA) of that database.
If you install your Informix database server according to the installation
instructions, the files that comprise the demonstration database are protected
so you cannot make any changes to the original database.
Introduction
11
You can run the dbaccessdemo7 script again whenever you want to work
with a fresh demonstration database. The script prompts you when the creation of the database is complete and asks if you would like to copy the sample command files to the current directory. Enter N if you have made changes
to the sample files and do not want them replaced with the original versions.
Enter Y if you want to copy over the sample command files.
2.
Create a new directory for the SQL command files. Create the directory by entering the following command:
3.
Make the new directory the current directory by entering the following command:
mkdir dirname
cd dirname
12
4.
Create the demonstration database and copy over the sample command files by entering the dbaccessdemo7 command.
To create the database without logging enter the follwoing
command:
dbaccessdemo7 dbname
To create the demonstration database with logging enter the following command:
dbaccessdemo7 -log dbname
You can specify all the options in one command as shown in the following command:
dbaccessdemo7 -log dbname -dbspace dbspacename
6.
To give someone else the access to the database that you have created, grant them the appropriate privileges using the GRANT statement. To remove privileges, use the REVOKE statement. The GRANT
and REVOKE statements are described in Chapter 1 of the Informix
Guide to SQL: Syntax.
Introduction
13
Serializable transactions
14
New ADD ROWIDS and DROP ROWIDS clauses in the ALTER TABLE
statement
You can use the ADD ROWIDS clause to add the rowid column to
fragmented tables. You can use the DROP ROWIDS clause to drop the
rowid column from a fragmented table that has a rowid column.
Introduction
15
16
DBBLOBBUF
DELIMIDENT
BUF_FET_SIZE
OPTCOMPIND
PDQPRIORITY
Introduction
17
Chapter
Informix Databases
1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1-3
1-4
1-5
1-5
1-5
1-6
1-6
1-6
1-7
1-7
1-7
1-8
1-8
1-8
1-9
.
.
.
.
.
.
1-9
1-10
1-10
.
.
.
1-10
1-11
1-11
.
.
.
.
.
1-12
1-13
1-13
1-13
1-14
1-2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1-14
1-15
1-15
1-15
1-15
1-16
1-16
1-16
.
.
.
.
.
.
.
.
1-16
1-18
1-18
1-20
1-21
1-22
1-22
1-24
1-25
1-26
Will the database use characters from a language other than English
in its tables?
This chapter describes the implications of each choice and summarizes how
these choices affect your databases. For many of the features and behaviors
described in this chapter, the specifics of implementation are discussed elsewhere in this Reference, the Informix Guide to SQL: Syntax or in the Informix
Guide to SQL: Tutorial.
Informix Databases
1-3
Data Types
Your choice of database server decides the following issues for a database:
This section summarizes how your choice of database server affects each of
these issues. References are also provided to indicate where you can find
more extended discussions of these issues.
Data Types
INFORMIX-OnLine Dynamic Server supports all the data types available to
INFORMIX-SE as well as the following additional data types:
BYTE
CHARACTER VARYING
TEXT
VARCHAR
NVARCHAR
See Database Data Types on page 3-3 for more information on individual
data types.
1-4
Transaction Logging
INFORMIX-OnLine Dynamic Server supports buffered logging and allows
For more information on the SET LOG statement, refer to Chapter 1 of the
Informix Guide to SQL: Syntax. See the INFORMIX-OnLine Dynamic Server
Administrators Guide for more information about buffered and unbuffered
logging.
For more information about fragmentation and the SQL statements you use
to created fragmented tables and indexes, see Chapter 1 of the Informix Guide
to SQL: Syntax. See the INFORMIX-OnLine Dynamic Server Performance Guide
for more information about how fragmentation can enhance performance.
Informix Databases
1-5
Locking Issues
Locking Issues
When you write applications for INFORMIX-OnLine Dynamic Server and
INFORMIX-SE, you should be aware of how each handles the following
locking issues:
The following four sections briefly describe how the different database
servers handle these locking issues.
Lock Scope
When you create a table, INFORMIX-OnLine Dynamic Server sets the lock
scope to page level by default. If you want, you can set the lock scope to row
level instead.
INFORMIX-SE supports only row-level locking.
Refer to Chapter 7 of the Informix Guide to SQL: Tutorial for more information
on lock scope. See the descriptions of CREATE TABLE or ALTER TABLE in
Chapter 1 of the Informix Guide to SQL: Syntax for how to specify a lock scope.
Lock Mode
INFORMIX-OnLine Dynamic Server supports three locking modes: shared,
exclusive, and promotable.The OnLine database server implicitly places promotable locks on the rows, which are selected for an update operation. Just
before the actual update, the OnLine promotes the lock to exclusive.
The INFORMIX-SE database server supports only shared and exclusive
locking. This results in different locking strategies for table updates. The
INFORMIX-SE database server does not have promotable locking, so it places
exclusive locks on rows that are selected for update.
For more information on lock modes, refer to Chapter 7 of the Informix Guide
to SQL: Tutorial. See also the description of the UPDATE statement in Chapter 1
of the Informix Guide to SQL: Syntax.
1-6
Isolation Level
Use of Shared Locks
INFORMIX-OnLine Dynamic Server supports shared locks on tables. Multiple
lock on a table.
For more information, see the description of LOCK TABLE in Chapter 1 of the
Informix Guide to SQL: Syntax.
Isolation Level
INFORMIX-OnLine Dynamic Server supports the SET TRANSACTION state-
ment for databases that use transaction logging. Using this option, you can
set the isolation level to Read Uncommitted, Read Committed, Repeatable
Read, and Serializable. The default isolation level is Read Committed, unless
the database is ANSI-compliant, in which case the default is Serializable.
INFORMIX-SE supports the SET TRANSACTION statement for access modes
only. All databases running on INFORMIX-SE use the Read Uncommitted
isolation level.
Informix Databases
1-7
syscolumns
sysindexes
syssyntables
systables
sysreferences
sysfragments
sysopclstr
sysblobs
For more information on the system catalog tables, see Chapter 2, System
Catalog.
1-8
ALTER FRAGMENT
SET CONSTRAINTS
SET ISOLATION
SET LOG
ALTER TABLE
CREATE DATABASE
CREATE TABLE
REVOKE
SET TRANSACTION
Condition
Constraint
Database Name
Expression
Index Name
Procedure Name
Synonym Name
Table Name
View Name
Important: If one of the segments in the preceding list contains a branch that is
specific to INFORMIX-OnLine Dynamic Server, the entire SQL statement is supported only by OnLine. For example, if a SELECT statement contains an expression
with a branch that is supported only by OnLine, the entire SELECT statement is
supported only by an OnLine database server.
Informix Databases
1-9
CHECK TABLE
CREATE AUDIT
DROP AUDIT
RECOVER TABLE
REPAIR TABLE
ROLLFORWARD DATABASE
START DATABASE
CONNECT
CREATE DATABASE
CREATE TABLE
Segments are elements of syntax that are extracted from the syntax of the SQL
statements. Segments are described in Chapter 1 of the Informix Guide to SQL:
Syntax. The Database Name segment is the only segment that contains an
option or branch that is supported only by INFORMIX-SE.
1-10
Name isolation
The ANSI table-naming scheme allows different users to create tables
in a database without having to worry about name conflicts.
Transaction isolation
Data recovery
ANSI-compliant databases enforce unbuffered logging and
automatic transactions for INFORMIX-OnLine Dynamic Server
database servers.
Informix Databases
1-11
Differences between ANSI-Compliant Databases and Databases that are not ANSI-Compliant
If you are using an SQL API such as INFORMIX-ESQL/C, you can test
the SQL Communications Area (SQLCA). Specifically, the third element in the SQLCAWARN structure contains a W immediately after
you open an ANSI-compliant database using the DATABASE or
CONNECT statement. For information on SQLCA, see Chapter 5 of
the Informix Guide to SQL: Tutorial or your SQL API manual.
1-12
Transactions
Transaction logging
Owner naming
Privileges on objects
Escape characters
Cursor behavior
Synonym behavior
Differences between ANSI-Compliant Databases and Databases that are not ANSITransactions
All the SQL statements that you issue in an ANSI-compliant database are
automatically contained in transactions. With a database that is not ANSIcompliant, you can choose whether to use transaction processing.
In a database that is not ANSI-compliant, a transaction is enclosed by a BEGIN
WORK statement and a COMMIT WORK or a ROLLBACK WORK statement.
However, in an ANSI-compliant database, the BEGIN WORK statement is
redundant and unnecessary because all statements are automatically
contained in a transaction. You need to indicate only the end of a transaction
with a COMMIT WORK or ROLLBACK WORK statement.
See Chapter 4 of the Informix Guide to SQL: Tutorial for more information on
transactions.
Transaction Logging
All ANSI-compliant databases on an INFORMIX-OnLine Dynamic Server
database server run with unbuffered transaction logging. Databases that are
not ANSI-compliant can run with either buffered logging or unbuffered logging. Unbuffered logging provides more comprehensive data recovery, but
buffered logging provides better performance.
See the description of CREATE DATABASE in Chapter 1 of the Informix Guide
to SQL: Syntax for more information.
Owner Naming
In an ANSI-compliant database, owner naming is enforced. When you supply
an object name in an SQL statement, ANSI standards require that the name
include the prefix owner., unless you are the owner of the object. The combination of owner and name must be unique in the database. If you are the
owner of the object, the database server supplies your user name as the
default.
Databases that are not ANSI-compliant do not enforce owner naming.
See Table Name in Chapter 1 of the Informix Guide to SQL: Syntax for more
information.
Informix Databases
1-13
Differences between ANSI-Compliant Databases and Databases that are not ANSI-Compliant
Privileges on Objects
ANSI-compliant databases and databases that are not ANSI-compliant differ
1-14
Differences between ANSI-Compliant Databases and Databases that are not ANSICharacter Data Types
In an ANSI-compliant database, you get an error if any character field (CHAR,
CHARACTER, VARCHAR, NCHAR, NVARCHAR, CHARACTER VARYING) is
filled with a string that is longer than the specified width of the field.
Escape Characters
In an ANSI-compliant database, escape characters can only escape the
following characters: percent (%) and underscore(_). An escape character can
also be used to escape itself. See the Condition segment in the Informix Guide
to SQL: Syntax for additional information.
Cursor Behavior
If a database is not ANSI-compliant, you need to use the FOR UPDATE
keywords when you declare an update cursor for a SELECT statement. The
SELECT statement must also meet the following conditions:
It does not include the DISTINCT, GROUP BY, INTO TEMP, ORDER BY,
UNION, or UNIQUE clauses and keywords.
With an ANSI-compliant database, you do not have to explicitly use the FOR
UPDATE keywords when you declare a cursor. In ANSI-compliant databases,
all cursors that meet the restrictions described in the preceding list are potentially UPDATE cursors. You can specify that a cursor is read-only with the FOR
READ ONLY keywords on the DECLARE statement.
See the description of the DECLARE statement in Chapter 1 of the Informix
Guide to SQL: Syntax for more information.
Informix Databases
1-15
Synonym Behavior
Synonyms are always private in an ANSI-compliant database. If you attempt
to create a public synonym, or use the PRIVATE keyword to designate a
private synonym in an ANSI-compliant database, you receive an error.
1-16
If you do not need to work with non-English character data or identifiers, you
can simply not activate NLS. Your Informix products thus perform as
intended for a U.S. English environment, and you can skip this section. However, even if your data does not contain non-English characters, you can
activate NLS to deviate from the standard ASCII collation order of your data.
Both the INFORMIX-OnLine Dynamic Server and INFORMIX-SE database servers allow database names in national character sets (the latter only if the operating system environment allows it). The associated utilities can display
database names, user names, and so on, on the screen in the local language.
Informix NLS-ready products are available only on platforms that support
NLS.
Once you activate the NLS functionality built into your Informix product by
setting the appropriate environment variables, you can create or access
database information in any language available on the system.
The implementation of NLS affects the following operations:
Informix Databases
1-17
Activating NLS
Activating NLS
You set specific environment variables to activate the NLS functionality in
Informix products and to create NLS databases. If you do not activate NLS,
your Informix products function in English.
LANG
1-18
Activating NLS
The following NLS environment variables are listed here alphabetically and
all are described in detail in the section NLS Environment Variables on
page 4-11:
COLLCHAR
DBAPICODE
LC_COLLATE
LC_CTYPE
LC_MONETARY
LC_NUMERIC
LC_TIME
Set this environment variable if you want previously written client applications to take advantage of the NLS collation feature without changing the code.
Set this environment variable so that your client applications on different platforms can use a different code set
than the one used by the database server and thus share
data. DBAPICODE lets systems that use nonstandard or
rare code sets access databases that store data using a
standard code set.
Set this environment variable to specify a collating or sort
sequence for your locale. The setting affects the evaluation of regular expressions and character-string handling
involving NCHAR and NVARCHAR data type fields.
Set this environment variable to affect the behavior of regular expressions and character evaluation functions such
as case conversion, spaces, and punctuation.
Set this environment variable to specify the format and
national currency symbol for money values.
Set this environment variable to specify the format and
decimal separator for numeric values.
Set this environment variable to define the format for
national dates and times, including country-specific
names and abbreviations for days of the week and
months.
DBNLS 1
LANG DE
LC_COLLATE DE_ch@dict
LC_MONETARY CH.88591
Informix Databases
1-19
Activating NLS
For a Version 6.0 or later SQL API or a pre-Version 6.0 SQL API that
goes through the relay module, the order of precedence for the locale
is outlined in the following list, from highest to lowest:
The database server uses the current locale to try to open the specified
database. If the database name contains non-ASCII characters and the locale
setting is different from that character set, the database name might be
rejected because the statement contains illegal characters. Or, the wrong database might open because a character from locale X might be mapped to
another character in locale Y. In other words, if database name contains characters that are not recognized by all European languages, you must be careful
to set the local correctly before opening the database.
For example, if the current locale is Z and the database name is tet, the
database cannot open unless the Z locale understands the character in the
database name. If the Z locale does not understand the character , the database cannot open.
This is true even if DBNLS is set to use open NLS (DBNLS=2). When DBNLS
is set to 2, all it means is that once the database is opened, its locale becomes
the active one. However, the SQL API locale must be able to find the database.
If you want to use open NLS to advantage, all the database names should
contain characters valid in the default locale C. (The database itself can be a
non-C database and the data can contain non-C characters.) When accessing
the database, set the locale to C; once the database opens, it switches to the
locale specified in the database.
1-20
Activating NLS
2.
For a PC client talking to a UNIX server, the locale used by the server
follows the order shown in the following list, from highest to lowest:
up
As stated previously, the database server uses this locale to try to open the
specified database. If the locale used is different from the one the database
name is in, the server might not be able to open the database. Again, to use
Open-NLS effectively, you should create the database with a name in ASCII
characters and set LC_CTYPE and LC_COLLATE to C when trying to access
the database. Or make sure that when the server is started, the locale is either
set to C or not set (the default is C).
1-21
Important: If you do not need NLS functionality for your character data, Informix
recommends using the CHAR column wherever possible. CHAR data require simple
value-based comparisons, sorting, and indexing, and thus these columns are
relatively inexpensive in terms of performance.
1-22
Informix Databases
1-23
The database server also returns the name of the correct LC_CTYPE
setting in the SQLERRM field of the SQLCA data structure for
Informix programming-language products.
1-24
NLS Functionality in Version 6.0 and Later Database Server and SQL
API Products
The Informix Version 6.0 and later products are NLS-ready. They allow you to
use NLS databases and database servers when working with SQL, provided
that you have activated NLS as described earlier.
In addition to the NLS functionality previously described for the
INFORMIX-OnLine Dynamic Server and INFORMIX-SE database server
products, the following Informix products have also been enhanced to
support NLS:
The SQL APIs, which allow host and indicator variable names as well
as names of all user-specifiable objects such as tables, columns,
views, cursors, and statements in national character sets
If you also want to receive error and warning messages in a language other
than English, you can install a language supplement for the specific locale
along with your Informix Version 6.0 and later product. The DBLANG
environment variable setting specifies the subdirectory under
$INFORMIXDIR/msg where the message files for each supported native
language reside.
Informix Databases
1-25
1-26
When DBNLS is set to 2, the locale of the application is not checked. When
the database server accesses the database, it assumes the locale of the
database.
You should be aware of the following behaviors when DBNLS is set to 2 and
COLLCHAR is set to 1:
If the application is not aware of the NLS data types, it should not
directly access the column type information in the system catalog
tables.
Informix Databases
1-27
Chapter
System Catalog
2-3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2-4
2-10
2-11
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2-12
2-13
2-14
2-15
2-16
2-17
2-20
2-22
2-23
2-24
2-25
2-26
2-29
2-31
2-32
2-33
2-34
2-35
2-36
2-36
2-38
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
SYSTABLES . . . . . . . . . . . . . . . . . . . .
SYSTRIGBODY . . . . . . . . . . . . . . . . . . .
SYSTRIGGERS . . . . . . . . . . . . . . . . . . .
SYSUSERS . . . . . . . . . . . . . . . . . . . .
SYSVIEWS . . . . . . . . . . . . . . . . . . . .
System Catalog Map .
Information Schema . . . . . . . . .
Generating the Information Schema Views
Accessing the Information Schema Views .
Structure of the Information Schema Views
TABLES . . . . . . . . . . .
COLUMNS . . . . . . . . . .
SQL_LANGUAGES . . . . . . .
SERVER_INFO . . . . . . . .
2-2
2-39
2-42
2-43
2-44
2-44
2-45
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
2-47
2-47
2-48
2-48
2-49
2-49
2-51
2-51
The structure, including the name and data type of each column, of
the tables that constitute the system catalog
Views
Triggers
Stored procedures
The system catalog tables are generated automatically when you create a
database, and you can query them as you would query any other table in the
database. If you are using INFORMIX-OnLine Dynamic Server, the data for
a newly created database and the 25 system catalog tables for that database
reside in a common area of the disk called a dbspace. If you are using the
INFORMIX-SE database server, the 22 system catalog tables for a newly
System Catalog 2-3
To process this CREATE SCHEMA block, the database server first accesses the
system catalog to verify the following information:
2-4
The new table and view names do not already exist in the database.
(If the database is ANSI-compliant, the database server verifies that
the table and view names do not already exist for the specified
owners.)
The user has permission to create the tables and grant user
privileges.
In addition to verifying this information and creating two new tables, the
database server adds new rows to the following system catalog tables:
systables
syscolumns
sysviews
systabauth
syscolauth
sysindexes
The following two new rows of information are added to the systables
system catalog table after the CREATE SCHEMA block shown on page 2-4 is
run.
tabname
owner
partnum
tabid
rowsize
ncols
nindexes
nrows
created
version
tabtype
locklevel
npused
fextsize
nextsize
flags
site
dbname
customer
maryl
16778361
101
134
10
2
0
04/26/1994
1
T
P
0
16
16
0
tabname
owner
partnum
tabid
rowsize
ncols
nindexes
nrows
created
version
tabtype
locklevel
npused
fextsize
nextsize
flags
site
dbname
california
maryl
0
102
134
4
0
0
04/26/1994
0
V
B
0
0
0
0
Each table recorded in the systables system catalog table is assigned a tabid,
a system-assigned sequential ID number that uniquely identifies each table
in the database. The system catalog tables receive tabid numbers 1 through
24, and the user-created tables receive tabid numbers beginning with 100.
2-6
The CREATE SCHEMA block also adds 14 rows to the syscolumns system
catalog table. These rows correspond to the columns in the table customer
and the view california, as shown in the following example:
colname
customer_num
fname
lname
company
address1
address2
city
state
zipcode
phone
101
101
101
101
101
101
101
101
101
101
1
2
3
4
5
6
7
8
9
10
262
0
0
0
0
0
0
0
0
0
4
15
15
20
20
20
15
2
5
18
fname
lname
company
phone
102
102
102
102
1
2
3
4
0
0
0
0
15
15
20
18
Tip: For all system catalog tables, all columns identified as a CHAR data type are
NCHAR data type if NLS functionality is activated. The data type remains as CHAR
if NLS functionality is not activated.
The rows shown in the following example are added to the sysviews system
catalog table. These rows correspond to the CREATE VIEW portion of the
CREATE SCHEMA block:
tabid
102
102
102
102
102
seq viewtext
0
1
2
3
4
The sysviews system catalog table contains the CREATE VIEW statement used
to create the view. Each line of the CREATE VIEW statement in the current
schema is stored in this table. In the viewtext column, the x0 that precedes the
column names in the statement (for example, x0.fname) operates as an alias
name that distinguishes between the same columns used in a self-join.
The CREATE SCHEMA block also adds rows to the systabauth system catalog
table. These rows correspond to the user privileges granted on customer and
california, as shown in the following example:
grantor
grantee
tabid
tabauth
maryl
maryl
maryl
public
cathl
nhowe
maryl
101
101
101
102
su-idx-SU-IDXAR
--*----SU-ID---
The tabauth column of this table specifies the table-level privileges granted
to users on the customer and california tables. This column uses an 8-byte
patterns (select), u (update), * (column-level privilege), i (insert), d (delete),
x (index), a (alter), r (references)to identify the type of privilege granted. In
this example, the user nhowe has column-level privileges on the customer
table.
If the tabauth privilege code is uppercase (for example, S for select), the user
who is granted this privilege can also grant it to others. If the tabauth privilege code is lowercase (for example, s for select), the user who is granted this
privilege cannot grant it to others.
2-8
In addition, three rows are added to the syscolauth system catalog table.
These rows correspond to the user privileges granted on specific columns in
the customer table, as shown in the following example:
grantor
grantee
tabid
colno
colauth
maryl
maryl
maryl
nhowe
nhowe
nhowe
101
101
101
2
3
10
-u-u-u-
The CREATE SCHEMA block adds two rows to the sysindexes system catalog
table. These rows correspond to the indexes created on the customer table, as
shown in the following example:
idxname
owner
tabid
idxtype
clustered
part1
part2
part3
part4
part5
part6
part7
part8
part9
part10
part11
part12
part13
part14
part15
part16
levels
leaves
nunique
clust
c_num_ix
maryl
101
U
state_ix
maryl
101
D
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
8
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
In this table, the idxtype column identifies whether the index created is
unique or a duplicate. For example, the index c_num_ix placed on the
customer_num column of the customer table is unique.
2-10
SELECT statements. For example, the following SELECT statement displays all
Warning: Although the user informix and DBAs can modify most system catalog
tables (only user informix can modify systables), Informix strongly recommends
that you do not update, delete, or insert any rows in them. Modifying the system catalog tables can destroy the integrity of the database. Informix supports using the
ALTER TABLE statement to modify the size of the next extent of system catalog tables.
2-12
sysblobs
syschecks
syscolauth
syscoldepend
syscolumns
sysconstraints
sysdefaults
sysdepend
sysdistrib
sysfragments
sysindexes
sysopclstr
sysprocauth
sysprocbody
sysprocedures
sysprocplan
sysreferences
syssynonyms
syssyntable
systabauth
systables
systrigbody
systriggers
sysusers
sysviews
SYSBLOBS
You should not confuse the system catalog tables of a database with the tables
in the sysmaster database of INFORMIX-OnLine Dynamic Server database
servers. The sysmaster tables also start with sys, but they contain information about an entire OnLine database server (which might manage many
databases). The information in the sysmaster tables is primarily useful for
OnLine database administrators. For more information about the sysmaster
tables, see the INFORMIX-OnLine Dynamic Server Administrators Guide.
SYSBLOBS
The sysblobs system catalog table specifies the storage location of a blob
column. It contains one row for each blob column in a table. Available in
INFORMIX-OnLine Dynamic Server only, the sysblobs system catalog table
has the following columns:
Column Name
Type
Explanation
spacename
CHAR(18)
type
CHAR(1)
Media type:
M = Magnetic
O = Optical
tabid
INTEGER
Table identifier
colno
SMALLINT
Column number
A composite index for the tabid and colno columns allows only unique
values.
SYSCHECKS
SYSCHECKS
The syschecks system catalog table describes each check constraint defined
in the database. Because the syschecks system catalog table stores both the
ASCII text and a binary encoded form of the check constraint, it contains multiple rows for each check constraint. The syschecks system catalog table has
the following columns:
Column Name
Type
Explanation
constrid
INTEGER
Constraint identifier
type
CHAR(1)
seqno
SMALLINT
checktext
CHAR(32)
A composite index for the constrid, type, and seqno columns allows only
unique values.
The text in the checktext column associated with B type in the type column
is in machine-readable format. To view the text associated with a particular
check constraint, use the following query with the appropriate constraint ID:
SELECT * FROM syschecks WHERE constrid=10 AND type='T'
Each check constraint described in the syschecks system catalog table also
has its own row in the sysconstraints system catalog table.
2-14
SYSCOLAUTH
SYSCOLAUTH
The syscolauth system catalog table describes each set of privileges granted
on a column. It contains one row for each set of column privileges granted in
the database. The syscolauth system catalog table has the following columns:
Column Name
Type
Explanation
grantor
CHAR(8)
Grantor of privilege
grantee
CHAR(8)
tabid
INTEGER
Table identifier
colno
SMALLINT
Column number
colauth
CHAR(3)
If the colauth privilege code is uppercase (for example, S for select), a user
who has this privilege can also grant it to others. If the colauth privilege code
is lowercase (for example, s for select), the user who is granted this privilege
cannot grant it to others.
A composite index for the tabid, grantor, grantee, and colno columns allows
only unique values. A composite index for the tabid and grantee columns
allows duplicate values.
SYSCOLDEPEND
SYSCOLDEPEND
The syscoldepend system catalog table tracks the table columns specified in
each check constraint. Because a check constraint can involve more than one
column in a table, it can contain multiple rows for each check constraint. The
syscoldepend system catalog table has the following columns:
Column Name
Type
Explanation
constrid
INTEGER
Constraint identifier
tabid
INTEGER
Table identifier
colno
SMALLINT
Column number
A composite index for the constrid, tabid, and colno columns allows only
unique values. A composite index for the tabid and colno columns allows
duplicate values.
2-16
SYSCOLUMNS
SYSCOLUMNS
The syscolumns system catalog table describes each column in the database.
One row exists for each column defined in a table or view. If you are using
the OnLine database server, the syscolumns system catalog table has the
following columns:
Column Name
Type
Explanation
colname
CHAR(18)
Column name
tabid
INTEGER
Table identifier
colno
SMALLINT
coltype
SMALLINT
8 = MONEY
1 = SMALLINT
10 = DATETIME
2 = INTEGER
11 = BYTE
3 = FLOAT
12 = TEXT
4 = SMALLFLOAT
13 = VARCHAR
5 = DECIMAL
14 = INTERVAL
6 = SERIAL
15 = NCHAR
7 = DATE
16 = NVARCHAR
collength
SMALLINT
colmin
INTEGER
colmax
INTEGER
If the coltype column contains a value greater than 256, it does not allow null
values. To determine the data type for a coltype column that contains a value
greater than 256, subtract 256 from the value and evaluate the remainder
based on the possible coltype values. For example, if a column has a coltype
value of 262, subtracting 256 from 262 leaves a remainder of 6, which
indicates that this column uses a SERIAL data type.
System Catalog 2-17
SYSCOLUMNS
The value that the collength column holds depends on the data type of the
column. If the data type of the column is BYTE or TEXT, collength holds the
length of the descriptor. A collength value for a MONEY or DECIMAL column
is determined using the following formula:
(precision * 256) + scale
For columns of type VARCHAR, the max_size and min_space values are
encoded in the collength column using one of the following formulas:
The length is the physical length of the DATETIME or INTERVAL field, and
largest_qualifier and smallest_qualifier have the following values:
2-18
Field Qualifier
Value
YEAR
MONTH
DAY
HOUR
MINUTE
SECOND
10
FRACTION(1)
11
FRACTION(2)
12
FRACTION(3)
13
FRACTION(4)
14
FRACTION(5)
15
SYSCOLUMNS
SYSCONSTRAINTS
If you are using the INFORMIX-SE database server, the syscolumns system
catalog table has the following columns:
Column Name
Type
Explanation
colname
CHAR(18)
Column name
tabid
INTEGER
Table identifier
colno
SMALLINT
Column number sequentially assigned by the system (ordinally from left to right within each table)
coltype
SMALLINT
collength
SMALLINT
0 = CHAR
6 = SERIAL
1 = SMALLINT
7 = DATE
2 = INTEGER
8 = MONEY
3 = FLOAT
10 = DATETIME
4 = SMALLFLOAT
14 = INTERVAL
5 = DECIMAL
15 = NCHAR
A composite index for the tabid and colno columns allows only unique
values.
SYSCONSTRAINTS
The sysconstraints system catalog table lists the constraints placed on the
columns in each database table. An entry is also placed in the sysindexes system catalog table for each unique primary-key, or referential constraint you
create, if the constraint does not already have a corresponding entry in the
sysindexes system catalog table. (Because indexes can be shared, more than
one constraint can be associated with an index.) The sysconstraints system
catalog table has the following columns:
2-20
SYSCONSTRAINTS
Column Name
Type
Explanation
constrid
SERIAL
constrname
CHAR(18)
Constraint name
owner
CHAR(8)
tabid
INTEGER
Table identifier
constrtype
CHAR(1)
Constraint type:
C = Check constraint
P = Primary key
R = Referential
U = Unique
idxname
CHAR(18)
Index name
A composite index for the constrname and owner columns allows only
unique values. The index for the tabid column allows duplicate values, and
the index for the constrid column allows only unique values.
For check constraints (where constrtype = C), the idxname is always null.
Additional information about each check constraint is contained in the
syschecks system catalog table.
SYSDEFAULTS
SYSDEFAULTS
The sysdefaults system catalog table lists the user-defined defaults placed on
each column in the database. One row exists for each user-defined default
value. If a default is not explicitly specified in the CREATE TABLE statement,
no entry exists in this table. The sysdefaults system catalog table has the
following columns:
Column Name
Type
Explanation
tabid
INTEGER
Table identifier
colno
SMALLINT
Column identifier
type
CHAR(1)
Default type:
L = Literal default
U = User
C = Current
N = Null
T = Today
S = Dbservername
default
CHAR(256)
If a literal is specified for the default value, it is stored in the default column
as ASCII text. If the literal value is not of type CHAR, the default column consists of two parts. The first part is the 6-bit representation of the binary value
of the default value structure. The second part is the default value in English
text. The two parts are separated by a space.
If the data type of the column is not CHAR or VARCHAR, a binary
representation is encoded in the default column.
A composite index for both the tabid and colno columns allows only unique
values.
2-22
SYSDEPEND
SYSDEPEND
The sysdepend system catalog table describes how each view or table
depends on other views or tables. One row exists in this table for each dependency, so a view based on three tables has three rows. The sysdepend system
catalog table has the following columns:
Column Name
Type
Explanation
btabid
INTEGER
btype
CHAR(1)
dtabid
INTEGER
dtype
CHAR(1)
The btabid and dtabid columns are indexed and allow duplicate values.
SYSDISTRIB
SYSDISTRIB
The sysdistrib system catalog table stores data-distribution information for
use by the database server. Data distributions provide detailed table column
information to the optimizer to improve the choice of execution paths for
optimization of SQL SELECT statements. Information is stored in the
sysdistrib table when an UPDATE STATISTICS statement with mode MEDIUM
or HIGH is run for a table. The sysdistrib system catalog table has the
following columns:
Column Name
Type
Explanation
tabid
INTEGER
colno
SMALLINT
seqno
INTEGER
constructed
DATE
mode
CHAR(1)
Optimization level:
L = Low
M = Medium
H = High
resolution
FLOAT
confidence
FLOAT
encdat
CHAR(256)
You can select any column from sysdistrib except encdat. User informix can
select the encdat column.
2-24
SYSFRAGMENTS
SYSFRAGMENTS
The sysfragments table stores fragmentation information for tables and
indexes. One row exists for each table or index fragment.
The sysfragments table has the following columns:
Column Name
Type
Explanation
fragtype
CHAR(1)
Fragment type:
I = Index
T = Table
tabid
INTEGER
Table identifier
indexname
CHAR(18)
Index identifier
colno
SMALLINT
partn
INTEGER
strategy
CHAR(1)
location
CHAR(1)
servername
CHAR(18)
evalpos
INTEGER
exprtext
TEXT
exprbin
BYTE
exprarr
BYTE
flags
INTEGER
Internally used
dbspace
CHAR(18)
(1 of 2)
System Catalog 2-25
SYSINDEXES
Column Name
Type
Explanation
levels
SMALLINT
npused
INTEGER
nrows
INTEGER
clust
INTEGER
(2 of 2)
The strategy type T is used for attached indexes (where index fragmentation
is the same as the table fragmentation).
SYSINDEXES
The sysindexes system catalog table describes the indexes in the database. It
contains one row for each index defined in the database. The sysindexes system catalog table for the OnLine database server has the following columns:
Column Name
Type
Explanation
idxname
CHAR(18)
Index name
owner
CHAR(8)
tabid
INTEGER
Table identifier
idxtype
CHAR(1)
Index type:
U = Unique
D = Duplicates
clustered
CHAR(1)
part1
SMALLINT
(1 of 2)
2-26
SYSINDEXES
Column Name
Type
Explanation
part2
SMALLINT
part3
SMALLINT
part4
SMALLINT
part5
SMALLINT
part6
SMALLINT
part7
SMALLINT
part8
SMALLINT
part9
SMALLINT
part10
SMALLINT
part11
SMALLINT
part12
SMALLINT
part13
SMALLINT
part14
SMALLINT
part15
SMALLINT
part16
SMALLINT
levels
SMALLINT
leaves
INTEGER
Number of leaves
nunique
INTEGER
clust
INTEGER
(2 of 2)
Changes that affect existing indexes are reflected in this table only after you
run UPDATE STATISTICS.
SYSINDEXES
Type
Explanation
idxname
CHAR(18)
Index name
owner
CHAR(8)
tabid
INTEGER
Table identifier
idxtype
CHAR(1)
Index type:
U = Unique
D = Duplicates
2-28
clustered
CHAR(1)
part1
SMALLINT
part2
SMALLINT
part3
SMALLINT
part4
SMALLINT
part5
SMALLINT
part6
SMALLINT
part7
SMALLINT
part8
SMALLINT
SYSOPCLSTR
SYSOPCLSTR
The sysopclstr system catalog table defines each optical cluster in the
database. Available for INFORMIX-OnLine Dynamic Server only, it contains
one row for each optical cluster. The sysopclstr system catalog table has the
following columns:
Column Name
Type
Explanation
owner
CHAR(8)
clstrname
CHAR(18)
clstrsize
INTEGER
tabid
INTEGER
Table identifier
blobcol1
SMALLINT
blobcol2
SMALLINT
blobcol3
SMALLINT
blobcol4
SMALLINT
blobcol5
SMALLINT
blobco16
SMALLINT
blobcol7
SMALLINT
blobcol8
SMALLINT
blobcol9
SMALLINT
blobcol10
SMALLINT
blobcol11
SMALLINT
(1 of 2)
System Catalog 2-29
SYSOPCLSTR
Column Name
Type
Explanation
blobcol12
SMALLINT
blobcol13
SMALLINT
blobcol14
SMALLINT
blobcol15
SMALLINT
blobcol16
SMALLINT
clstrkey1
SMALLINT
clstrkey2
SMALLINT
clstrkey3
SMALLINT
clstrkey4
SMALLINT
clstrkey5
SMALLINT
clstrkey6
SMALLINT
clstrkey7
SMALLINT
clstrkey8
SMALLINT
clstrkey9
SMALLINT
clstrkey10
SMALLINT
clstrkey11
SMALLINT
clstrkey12
SMALLINT
clstrkey13
SMALLINT
clstrkey14
SMALLINT
clstrkey15
SMALLINT
clstrkey16
SMALLINT
(2 of 2)
A composite index for both the clstrname and owner columns allows only
unique values. The tabid column allows duplicate values.
2-30
SYSPROCAUTH
SYSPROCAUTH
The sysprocauth table describes the privileges granted on a procedure. It
contains one row for each set of privileges granted. The sysprocauth system
catalog table has the following columns:
Column Name
Type
Explanation
grantor
CHAR(8)
Grantor of procedure
grantee
CHAR(8)
procid
INTEGER
Procedure identifier
procauth
CHAR(1)
it to others
A composite index for the procid, grantor, and grantee columns allows only
unique values. The composite index for the procid and grantee columns
allows duplicate values.
SYSPROCBODY
SYSPROCBODY
The sysprocbody system catalog table describes the compiled version of each
stored procedure in the database. Because the sysprocbody system catalog
table stores the text of the procedure, each procedure can have multiple rows.
The sysprocbody system catalog table has the following columns
:
Column Name
Type
Explanation
procid
INTEGER
Procedure identifier
datakey
CHAR(1)
Data-descriptor type:
D = User document text
T = Actual procedure source
R = Return value type list
S = Procedure symbol table
L = Constant procedure data string (that is, lit-
seqno
INTEGER
data
CHAR(256)
Although the datakey column indicates the type of data stored, the data
column contains the actual data, which can be one of the following types of
data: the encoded return values list, the encoded symbol table, constant data,
compiled code for the procedure, or the text of the procedure and its
documentation.
A composite index for the procid, datakey, and seqno columns allows only
unique values.
2-32
SYSPROCEDURES
SYSPROCEDURES
The sysprocedures system catalog table lists the characteristics for each
stored procedure in the database. It contains one row for each procedure. The
sysprocedures system catalog table has the following columns:
Column Name
Type
Explanation
procname
CHAR(18)
Procedure name
owner
CHAR(8)
Owner name
procid
SERIAL
Procedure identifier
mode
CHAR(1)
Mode type:
D = DBA
O = Owner
P = Protected
retsize
INTEGER
symsize
INTEGER
datasize
INTEGER
codesize
INTEGER
numargs
INTEGER
A composite index for the procname and owner columns allows only unique
values.
A database server can create special-purpose protected stored procedures for
internal use. The sysprocedures table identifies these protected procedures
with the letter P in the mode column. You cannot modify or drop protected
stored procedures.
SYSPROCPLAN
SYSPROCPLAN
The sysprocplan system catalog table describes the query-execution plans
and dependency lists for data-manipulation statements within each stored
procedure. Because different parts of a procedure plan can be created on different dates, the table can contain multiple rows for each procedure. The
sysprocplan system catalog table has the following columns:
Column Name
Type
Explanation
procid
INTEGER
Procedure identifier
planid
INTEGER
Plan identifier
datakey
CHAR(1)
seqno
INTEGER
created
DATE
datasize
INTEGER
data
CHAR(256)
A composite index for the procid, planid, datakey, and seqno columns
allows only unique values.
2-34
SYSREFERENCES
SYSREFERENCES
The sysreferences system catalog table lists the referential constraints placed
on columns in the database. It contains a row for each referential constraint
in the database. The sysreferences table has the following columns:
Column Name
Type
Explanation
constrid
INTEGER
Constraint identifier
primary
INTEGER
ptabid
INTEGER
updrule
CHAR(1)
delrule
CHAR(1)
matchtype
CHAR(1)
pendant
CHAR(1)
The constrid column is indexed and allows only unique values. The primary
column is indexed and allows duplicate values. If you are using the
INFORMIX-SE database server, the contents of the delrule column are
reserved.
SYSSYNONYMS
SYSSYNONYMS
The syssynonyms system catalog table lists the synonyms for each table or
view. It contains a row for every synonym defined in the database. The
syssynonyms system catalog table has the following columns:
Column Name
Type
Explanation
owner
CHAR(8)
synname
CHAR(18)
Synonym identifier
created
DATE
tabid
INTEGER
Table identifier
A composite index for the owner and synonym columns allows only unique
values. The tabid column is indexed and allows duplicate values.
Important: Informix products Version 4.0 or later no longer use this table; however,
any syssynonyms entries made before Version 4.0 remain in this table.
SYSSYNTABLE
The syssyntable system catalog table outlines the mapping between each
synonym and the object it represents. It contains one row for each entry in the
systables table that has a tabtype of S. The syssyntable system catalog table
has the following columns:
2-36
Column Name
Type
Explanation
tabid
INTEGER
Table identifier
servername
CHAR(18)
Server name
dbname
CHAR(18)
Database name
owner
CHAR(8)
tabname
CHAR(18)
Name of table
btabid
INTEGER
SYSSYNTABLE
If you define a synonym for a table that is in your current database, only the
tabid and btabid columns are used. If you define a synonym for a table that
is external to your current database, the btabid column is not used, but the
tabid, servername, dbname, owner, and tabname columns are used.
The tabid column maps to the tabid column in systables. With the tabid
information, you can determine additional facts about the synonym from
systables.
An index for the tabid column allows only unique values. The btabid column
is indexed to allow duplicate values.
If you are using the INFORMIX-SE database server, only the tabid and btabid
columns are used.
SYSTABAUTH
SYSTABAUTH
The systabauth system catalog table describes each set of privileges granted
in a table. It contains one row for each set of table privileges granted in the
database. The systabauth system catalog table has the following columns:
Column Name
Type
Explanation
grantor
CHAR(8)
Grantor of privilege
grantee
CHAR(8)
tabid
INTEGER
Table identifier
tabauth
CHAR(8)
* = Column-level authority
i = Insert
d = Delete
x = Index
a = Alter
r = References
If the tabauth privilege code is uppercase (for example, S for select), a user
who has this privilege also can grant it to others. If the tabauth privilege code
is lowercase (for example, s for select), the user who has this privilege cannot
grant it to others.
A composite index for the tabid, grantor, and grantee columns allows only
unique values. The composite index for the tabid and grantee columns
allows duplicate values.
2-38
SYSTABLES
SYSTABLES
The systables system catalog table describes each table in the database. It
contains one row for each table, view, or synonym defined in the database.
This includes all database tables and the system catalog tables. If you are
using INFORMIX-OnLine Dynamic Server, the systables system catalog table
has the following columns:
Column Name
Type
Explanation
tabname
CHAR(18)
owner
CHAR(8)
partnum
INTEGER
tabid
SERIAL
rowsize
SMALLINT
Row size
ncols
SMALLINT
Number of columns
nindexes
SMALLINT
Number of indexes
nrows
INTEGER
Number of rows
created
DATE
Date created
version
INTEGER
tabtype
CHAR(1)
Table type:
T = Table
V = View
P = Private synonym
P = Synonym (in an ANSI-compliant database)
S = Synonym
(1 of 2)
SYSTABLES
Column Name
Type
Explanation
locklevel
CHAR(1)
npused
INTEGER
fextsize
INTEGER
nextsize
INTEGER
flags
SMALLINT
site
CHAR(18)
dbname
CHAR(18)
(2 of 2)
The tabid column is indexed and must contain unique values. A composite
index for both the tabname and owner columns allows only unique values.
The version column contains an encoded number that is put into the
systables system catalog table when the table is created. Portions of the
encoded value are incremented when data definition statements, such as
ALTER INDEX, ALTER TABLE, DROP INDEX, and CREATE INDEX, are performed. When a prepared statement is executed, the version number is
checked to make sure that nothing has changed since the statement was prepared. If the version number has changed, your statement does not execute
and you must prepare your statement again.
2-40
SYSTABLES
If you are using the INFORMIX-SE database server, the systables system
catalog table has the following columns:
Column Name
Type
Explanation
tabname
CHAR(18)
Name of table
owner
CHAR(8)
dirpath
CHAR(64)
tabid
SERIAL
rowsize
SMALLINT
Row size
ncols
SMALLINT
Number of columns
nindexes
SMALLINT
Number of indexes
nrows
INTEGER
Number of rows
created
DATE
Date created
version
INTEGER
tabtype
CHAR(1)
Table type:
T = Table
V = View
S = Synonym
L = Log
P = Synonym (in an ANSI-compliant database)
audpath
CHAR(64)
The dirpath column contains the directory path for the table or log file. The
tabid column is indexed and must contain unique values. A composite index
for the tabname and owner columns allows only unique values.
SYSTRIGBODY
When NLS functionality has been activated, two hidden rows are added to
the systables system catalog table. NLSCOLL represents the LC_COLLATE setting and has a tabid of 90; NLSCTYPE represents the LC_CTYPE setting and
has a tabid of 91. Enter the following SELECT statement to view these two
hidden rows:
SELECT tabname, tabid FROM systables
SYSTRIGBODY
The systrigbody system catalog table contains the English text of the trigger
definition and the linearized code for the trigger. Linearized code is binary
data and code that is represented in ASCII format.
Warning: The database server uses the linearized code that is stored in systrigbody.
You must not alter the content of rows that contain linearized code.
The systrigbody system catalog table has the following columns:
Column Name
Type
Explanation
trigid
INT
Trigger identifier
datakey
CHAR
Type of data:
D = English text for the header, trigger definition
A = English text for the body, triggered actions
H = Linearized code for the header
S = Linearized code for the symbol table
B = Linearized code for the body
seqno
INT
Sequence number
data
CHAR(256)
A composite index for the trigid, datakey, and seqno columns allows only
unique values.
2-42
SYSTRIGGERS
SYSTRIGGERS
The systriggers system catalog table contains miscellaneous information
about the SQL triggers in the database. This information includes the trigger
event and the correlated reference specification for the trigger. The
systriggers system catalog table has the following columns:
Column Name
Type
Explanation
trigid
SERIAL
Trigger identifier
trigname
CHAR(18)
Trigger name
owner
CHAR(8)
Owner of trigger
tabid
INT
ID of triggering table
event
CHAR
Triggering event:
I = Insert trigger
U = Update trigger
D = Delete trigger
old
CHAR(18)
new
CHAR(18)
mode
CHAR
A composite index for the trigname and owner columns allows only unique
values. The trigid column is indexed and must contain unique values. An
index for the tabid column allows duplicate values.
SYSUSERS
SYSUSERS
The sysusers system catalog table describes each set of privileges granted in
the database. It contains one row for each user who is granted privileges in
the database. The sysusers system catalog table has the following columns:
Column Name
Type
Explanation
username
CHAR(8)
usertype
CHAR(1)
indexes)
C = Connect (work within existing tables)
priority
SMALLINT
password
CHAR(8)
SYSVIEWS
The sysviews system catalog table describes each view defined in the
database. Because the sysviews system catalog table stores the actual SELECT
statement used to create the view, it can contain multiple rows for each view
into the database. The sysviews system catalog table has the following
columns:
Column Name
Type
Explanation
tabid
INTEGER
Table identifier
seqno
SMALLINT
viewtext
CHAR(64)
A composite index for the tabid and seqno columns allows only unique
values.
2-44
systables
tabid tabname owner dirpath rowsize ncols nindexes nrows created version tabtype audpath
partnum locklevel npused fextsize nextsize flags site dbname
syssyntable
tabid tabname servername dbname owne btabid
syssynonyms
tabid owner synname created
syscolumns
sysdepend
btabid btype dtabid dtype
syscolauth
tabid colno grantor grantee colauth
sysusers
username usertype priority password
sysindexes
tabid idxname owner idxtype clustered part1part16 levels leaves nunique clust
sysconstraints
tabid idxname constrid constrname owner constrtype
sysopclstr
tabid owner clstrname clstrsize blobcol1blobcol16 clstrkey1clstrkey16
(1 of 2)
systriggers
tabid trigid trigname owner event old new mode
systrigbody
trigid datakey seqno data
sysdistrib
tabid colno seqno constructed mode resolution confidence encdat
sysprocplan
systabauth
sysviews
sysprocbody
sysblobs
sysprocauth
sysdefaults
tabid colno type default
sysprocedures
procid procname owner mode retsize symsize
datasize codesize numargs
syscoldepend
tabid colno constrid
syschecks
constrid type seqno checktext
sysreferences
constrid primary ptabid updrule delrule matchtype pendant
(2 of 2)
2-46
Information Schema
Information Schema
The Information Schema consists of read-only views that provide information about all the tables, views, and columns on the current database server
to which you have access. In addition, Information Schema views provide
information about SQL dialects (such as Informix, Oracle, or Sybase) and SQL
standards.
This version of the Information Schema views are X/Open CAE standards.
Informix provides them so that applications developed on other database
systems can obtain Informix system catalog information without having to
use the Informix system catalogs directly.
Important: Because the X/Open CAE standards Information Schema views differ
from ANSI-compliant Information Schema views, it is not recommended that you
install the X/Open CAE Information Schema views on ANSI-compliant databases.
The following Information Schema views are available:
tables
columns
sql_languages
server_info
The views are populated by data in the Informix system catalog tables. If
tables, views, or stored procedures exist with any of the same names as the
Information Schema views, you need to either rename the database objects or
rename the views in the script before you can install the views. You can drop
the views by using the DROP VIEW statement on each view. Re-create the
views by running the script again.
Important: In addition to the columns specified for each Information Schema view,
individual vendors may include additional columns or change the order of the columns. Informix recommends that applications not use the forms SELECT * or
SELECT table-name.* to access an Information Schema view.
tables
columns
sql_languages
server_info
Most columns in the views are defined as VARCHAR data types with large
maximums to accept large names and in anticipation of long identifier names
in future standards.
2-48
Data Type
Explanation
table_schema
VARCHAR(128)
Owner of table
table_name
VARCHAR(128)
table_type
VARCHAR(128)
remarks
VARCHAR(255)
Reserved
The visible rows in the tables view depend on your privileges. For example,
if you have one or more privileges on a table, (such as Insert, Delete, Select,
References, Alter, Index, or Update on one or more columns) or if these privileges have been granted to PUBLIC, you see one row describing that table.
COLUMNS
The columns Information Schema view contains one row for each column
accessible to you. It contains the following columns:
Column Name
Data Type
Explanation
table_schema
VARCHAR(128)
Owner of table
table_name
VARCHAR(128)
column_name
VARCHAR(128)
ordinal_position
INTEGER
data_type
VARCHAR(254)
char_max_length
INTEGER
(1 of 2)
System Catalog 2-49
Column Name
Data Type
Explanation
numeric_precision
INTEGER
numeric_prec_radix
INTEGER
numeric_scale
INTEGER
datetime_precision
INTEGER
is_nullable
VARCHAR(3)
remarks
VARCHAR(254)
Reserved
(2 of 2)
2-50
Data Type
Explanation
source
VARCHAR(254)
source_year
VARCHAR(254)
conformance
VARCHAR(254)
integrity
VARCHAR(254)
implementation
VARCHAR(254)
binding_style
VARCHAR(254)
programming_lang
VARCHAR(254)
SERVER_INFO
The server_info Information Schema view describes the database server to
which the application is currently connected. It contains the following
columns:
Column Name
Data Type
Explanation
server_attribute
VARCHAR(254)
attribute_value
VARCHAR(254)
Description
identifier_length
row_length
userid_length
txn_isolation
collation_seq
2-52
Chapter
Data Types
3
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
3-3
3-3
3-4
3-5
3-6
3-7
3-8
3-9
3-9
3-12
3-13
3-13
3-15
3-15
3-15
3-16
3-16
3-19
3-20
3-21
3-21
3-21
3-22
3-23
3-23
3-24
3-24
3-25
3-26
3-26
3-27
3-2
3-28
3-28
3-29
3-30
3-30
3-32
3-33
3-34
3-36
3-36
.
.
.
.
.
.
.
.
.
.
.
.
Effects of NLS
The NCHAR data type is recognized only when NLS is enabled by setting the
DBNLS environment variable. In addition, the LANG and the LC sublocale
environment variable settings specify a language environment that might
influence the default formats for date, monetary, and numeric values as well
as collation order.
Explanation
BYTE
CHAR
CHARACTER
CHARACTER VARYING
DATE
DATETIME
DEC
DECIMAL
DOUBLE PRECISION
FLOAT
INT
INTEGER
INTERVAL
MONEY
NCHAR
NUMERIC
NVARCHAR
REAL
(1 of 2)
3-4
BYTE
Data Type
Explanation
SERIAL
SMALLFLOAT
SMALLINT
TEXT
VARCHAR
(2 of 2)
BYTE
The BYTE data type stores any kind of binary data in an undifferentiated byte
stream. Binary data typically consists of saved spreadsheets, program load
modules, digitized voice patterns, and so on. The INFORMIX-SE database
server does not support this data type.
The BYTE data type has no maximum size. A BYTE column has a theoretical
limit of 231 bytes and a practical limit determined by your disk capacity.
You can store, retrieve, update, or delete the contents of a BYTE column.
However, you cannot use BYTE data items in arithmetic or string operations,
or assign literals to BYTE items with the SET clause of the UPDATE statement.
You also cannot use BYTE items in any of the following ways:
You can use BYTE objects in a Boolean expression only if you are testing for
null values.
CHAR(n)
You can insert data into BYTE columns in the following ways:
You cannot use a quoted text string, number, or any other actual value to
insert or update BYTE columns.
When you select a BYTE column, you can choose to receive all or part of it. To
see it all, use the regular syntax for selecting a column. You can also select any
part of a BYTE column by using subscripts as shown in the following
example:
SELECT cat_picture [1,75] FROM catalog WHERE catalog_num = 10001
This statement reads the first 75 bytes of the cat_picture column associated
with the catalog number 10001.
Tip: If you select a BYTE column using the DB-Access Interactive Schema Editor,
only the phrase BYTE value is returned; no actual value is displayed.
CHAR(n)
The CHAR data type stores any string of letters, numbers, and symbols. A
character column has a maximum length n, where 1 n 32,767. (If you are
using the INFORMIX-SE database server, the maximum length is 32,511.) If
you do not specify n, CHAR(1) is assumed.
Character columns typically store names, addresses, phone numbers, and so
on. Because the length of this column is fixed, when a character value is
retrieved or stored, exactly n bytes of data are transferred. If the value is
shorter than n, the string is extended with spaces to make up the n bytes. If
the value is longer than n, the string is truncated.
If you plan to perform calculations on numbers stored in a column, you
should assign a number data type to that column. Although you can store
numbers in CHAR columns, you might not be able to use them in some arithmetic operations. For example, if you are inserting the sum of values into a
character column, you might experience overflow problems if the character
column is too small to hold the value. In this case, the insert fails. However,
3-6
CHARACTER(n)
numbers that have leading zeros (such as some zip codes) have the zeros
stripped if they are stored as number types INTEGER or SMALLINT. Instead,
store these numbers in CHAR columns.
CHAR values are compared to other CHAR values by taking the shorter value
and padding it on the right with spaces until the values have equal length.
Then, the two values are compared for the full length.
CHAR data types require 1 byte per character, or n bytes.
When NLS has been enabled, CHAR data columns are treated as NCHAR data
columns. For additional information, see the description of the NCHAR data
type on page 3-20.
CHARACTER(n)
The CHARACTER data type is a synonym for CHAR.
CHARACTER VARYING(m,r)
CHARACTER VARYING(m,r)
The CHARACTER VARYING data type stores a character string of varying
length, where m is the maximum size of the column and r is the minimum
amount of space reserved for that column. The INFORMIX-SE database server
does not support this data type. The CHARACTER VARYING data type complies with ANSI standards; the Informix VARCHAR data type displays the
same functionality.
You must specify the maximum size (m) of the CHARACTER VARYING column. The size of this parameter can range from 1 to 255 bytes. If you are placing an index on a CHARACTER VARYING column, the maximum size is 254
bytes. You can store shorter, but not longer, character strings than the value
you specify.
Specifying the minimum reserved space (r) parameter is optional. This value
can range from 0 to 255 bytes but must be less than the maximum size (m) of
the CHARACTER VARYING column. If you do not specify a minimum space
value, it defaults to 0. You should specify this parameter when you initially
intend to insert rows with short or null data in this column, but later expect
the data to be updated with longer values.
Although the use of CHARACTER VARYING economizes on space used
in a table, it has no effect on the size of an index. In an index based on a
CHARACTER VARYING column, each index key has length m, the maximum
size of the column.
When you store a CHARACTER VARYING value in the database, only
its defined characters are stored. The database server does not strip a
CHARACTER VARYING object of any user-entered trailing blanks, nor does
the database server pad the CHARACTER VARYING to the full length of the
column. However, if you specify a minimum reserved space (r) and some
data values are shorter than that amount, some space reserved for rows goes
unused.
CHARACTER VARYING values are compared to other CHARACTER VARYING
values and to character values in the same way that character values are compared. The shorter value is padded on the right with spaces until the values
have equal lengths; then they are compared for the full length.
3-8
DATE
DATE
The DATE data type stores the calendar date. A calendar date is stored
internally as an integer value equal to the number of days since December 31,
1899.
The default display format of a DATE column is shown in the following
example:
mm/dd/yyyy
You can change the default date format by changing the DBDATE
environment variable. In addition, NLS lets you define the date and time
format with LC_TIME. See Chapter 4, Environment Variables, for more
information.
DATETIME
The DATETIME data type stores an instant in time expressed as a calendar
date and time of day. You choose how precisely a DATETIME value is stored;
its precision can range from a year to a fraction of a second.
The DATETIME data type is composed of a contiguous sequence of fields that
represents each component of time you want to record and uses the following
syntax:
DATETIME largest_qualifier TO smallest_qualifier
DATETIME
The largest_qualifier and smallest_qualifier can be any one of the fields listed in
Figure 3-2.
Figure 3-2
DATETIME field qualifiers
Qualifier Field
Valid Entries
YEAR
MONTH
DAY
HOUR
MINUTE
SECOND
FRACTION
A DATETIME column does not need to include all fields from YEAR to
FRACTION; it can include a subset of fields or even a single field. For example,
you can enter a value of MONTH TO HOUR into a column that is defined as
YEAR TO MINUTE, as long as each entered value contains information for a
contiguous sequence of fields. You cannot, however, define a column for just
MONTH and HOUR; this entry must also include a value for DAY.
If you are using the DB-Access TABLE menu and you do not specify the
DATETIME qualifiers, the default DATETIME qualifier, YEAR TO YEAR, is
assigned.
A valid DATETIME literal must include the DATETIME keyword, the values to
be entered, and the field qualifiers. (See the discussion of literal DATETIME in
Chapter 1 of the Informix Guide to SQL: Syntax.) You must include these qualifiers because, as noted earlier, the value you enter can contain fewer fields
than defined for that column. Acceptable qualifiers for the first and last fields
are identical to the list of valid DATETIME fields listed in Figure 3-2.
3-10
DATETIME
Values for the field qualifiers are written as integers and separated by
delimiters. Figure 3-3 lists the delimiters that are used with DATETIME
values.
Figure 3-3
Delimiters used with DATETIME
Delimiter
hyphen
space
colon
Between the HOUR and MINUTE and the MINUTE and SECOND
portions of the value
decimal point
93-08-16 12:42:06.001
year
minute
day
month
hour
Figure 3-4
Example DATETIME
value with delimiters
fraction
second
When you enter a value with fewer fields than the defined column, the value
you enter is expanded automatically to fill all the defined fields. If you leave
out any more-significant fields, that is, fields of larger magnitude than any
value you supply, those fields are filled automatically with the current date.
If you leave out any less-significant fields, those fields are filled with zeros (or
a one for MONTH and DAY) in your entry.
DEC
You also can enter DATETIME values as character strings. However, the
character string must include information for each field defined in the
DATETIME column. The INSERT statement in the following example shows a
DATETIME value entered as a character string:
INSERT into cust_calls (customer_num, call_dtime, user_id,
call_code, call_descr)
VALUES (101, '1993-08-14 08:45', 'maryj', 'D',
'Order late - placed 6/1/92')
For example, a YEAR TO DAY qualifier requires a total of eight digits (four
for year, two for month, and two for day). This data value requires 5, or
(8/2) + 1, bytes of storage.
For information on using DATETIME data in arithmetic and relational expressions, see Range of Operations Using DATE, DATETIME, and INTERVAL
on page 3-30. For information on using DATETIME as a constant expression,
see Chapter 1 of the Informix Guide to SQL: Syntax.
DEC
The DEC data type is a synonym for DECIMAL.
3-12
DECIMAL
DECIMAL
The DECIMAL data type can take two forms: DECIMAL(p) floating point, and
DECIMAL(p,s) fixed point.
DECIMAL Storage
The database server uses 1 byte of disk storage to store two digits of a decimal
number. The database server uses an additional byte to store the exponent
and sign. The significant digits to left of the decimal and the significant digits
to the right of the decimal are stored on separate groups of bytes. This is best
illustrated with an example. If you specify DECIMAL(6,3), the data type consists of three significant digits to the left of the decimal and three significant
digits to the right of the decimal (for instance, 123.456). The three digits to the
left of the decimal are stored on 2 bytes (where one of the bytes only holds a
Data Types 3-13
DECIMAL
single digit) and the three digits to the right of the decimal are stored on
another 2 bytes as illustrated in Figure 3-5. With the additional byte required
for the exponent and sign, this data type requires a total of 5 bytes of storage.
Byte 1
-
Byte 2
1
Byte 3
3
Byte 4
5
Figure 3-5
Schematic
illustrating the
storage of digits in a
decimal value. (The
exponent byte is not
shown.)
You can use the following formulas (rounded down to a whole number of
bytes) to calculate the byte storage (N) for a decimal data type (N includes the
byte required to store the exponent and sign):
If the scale is odd: N = (precision + 4) / 2
If the scale is even: N = (precision + 3) / 2
For example, the data type DECIMAL(5,3) requires 4 bytes of storage (9/2
rounded down equals 4).
There is one caveat to these formulas. The maximum number of bytes the
database server uses to store a decimal value is 17. One byte is used to store
the exponent and sign leaving 16 bytes to store up to 32 digits of precision. If
you specify a precision of 32 and an odd scale, however, you lose 1 digit of precision. Consider, for example, the data type DECIMAL(32,31). This decimal is
defined as 1 digit to the left of the decimal and 31 digits to the right. The 1
digit to the left of the decimal requires 1 byte of storage. This leaves only 15
bytes of storage for the digits to the right of the decimal. The 15 bytes can
accommodate only 30 digits, so 1 digit of precision is lost.
3-14
DOUBLE PRECISION
DOUBLE PRECISION
Columns defined as DOUBLE PRECISION behave the same as those defined
for FLOAT.
FLOAT(n)
The FLOAT data type stores double-precision floating-point numbers with up
to 16 significant digits. FLOAT corresponds to the double data type in C. The
range of values for the FLOAT data type is the same as the range of values for
the C double data type on your computer.
You can use n to specify the precision of a FLOAT data type, but SQL ignores
the precision. The value n must be a whole number between 1 and 14.
A column with the FLOAT data type typically stores scientific numbers that
INT
The INT data type is a synonym for INTEGER.
INTEGER
INTEGER
The INTEGER data type stores whole numbers that range from 2,147,483,647
to 2,147,483,647. The maximum negative number, 2,147,483,648, is a
reserved value and cannot be used. The INTEGER data type is stored as a
signed binary integer and is typically used to store counts, quantities, and so
on.
Arithmetic operations and sort comparisons are performed more efficiently
on integer data than on float or decimal data. However, INTEGER columns
can store only a limited range of values. If the data value exceeds the numeric
range, the database server does not store the value.
INTEGER data types require 4 bytes per value.
INTERVAL
The INTERVAL data type stores a value that represents a span of time.
INTERVAL types are divided into two classes: year-month intervals and
day-time intervals. A year-month interval can represent a span of years and
months, and a day-time interval can represent a span of days, hours, minutes,
seconds, and fractions of a second.
An INTERVAL value always is composed of one value, or a contiguous
sequence of values, that represent a component of time. An INTERVAL data
type is defined using the following example:
INTERVAL largest_qualifier(n) TO smallest_qualifier(n)
In this example, the largest_qualifier and smallest_qualifier fields are taken from
one of the two INTERVAL classes shown in Figure 3-6, and n optionally specifies the precision of the largest field (and smallest field if it is a FRACTION).
3-16
INTERVAL
Figure 3-6
Interval Classes
Qualifier Field
Valid Entry
YEAR-MONTH
INTERVAL Class
YEAR
A number of years
MONTH
A number of months
DAY-TIME
INTERVAL Class
DAY
A number of days
HOUR
A number of hours
MINUTE
A number of minutes
SECOND
A number of seconds
FRACTION
INTERVAL
When you enter a value in an INTERVAL column, you must specify the largest
and smallest fields in the value, just as you do for DATETIME values. In addition, you can use n optionally to specify the precision of the first field (and the
last field if it is a FRACTION). If the largest and smallest field qualifiers are
both FRACTIONS, you can specify only the precision in the last field. Acceptable qualifiers for the largest and smallest fields are identical to the list of
INTERVAL fields displayed in Figure 3-6.
If you are using the DB-Access TABLE menu and you do not specify the
INTERVAL field qualifiers, the default INTERVAL qualifier, YEAR TO YEAR, is
assigned.
The largest_qualifier in an INTERVAL value can be up to nine digits (except for
FRACTION, which cannot be more than five digits), but if the value you want
to enter is greater than the default number of digits allowed for that field, you
must explicitly identify the number of significant digits in the value you are
entering. For example, to define an INTERVAL of DAY TO HOUR that can store
up to 999 days, you could specify it as shown in the following example:
INTERVAL DAY(3) TO HOUR
3-18
Delimiter
hyphen
space
colon
Between the HOUR and MINUTE and the MINUTE and SECOND
portions of the value
decimal point
MONEY(p,s)
You also can enter INTERVAL values as character strings. However, the
character string must include information for the identical sequence of fields
defined for that column. The INSERT statement in the following example
shows an INTERVAL value entered as a character string:
INSERT INTO manufact (manu_code, manu_name, lead_time)
VALUES ('BRO', 'Ball-Racquet Originals', '160')
For example, a YEAR TO MONTH qualifier requires a total of six digits (four
for year and two for month). This data value requires 4, or (6/2) + 1, bytes of
storage.
For information on using INTERVAL data in arithmetic and relational
operations, see Range of Operations Using DATE, DATETIME,
and INTERVAL on page 3-30. For information on using INTERVAL as a constant expression, see the description of the INTERVAL Field Qualifier segment
in Chapter 1 of the Informix Guide to SQL: Syntax.
MONEY(p,s)
The MONEY data type stores currency amounts. As with the DECIMAL data
type, the MONEY data type stores fixed-point numbers up to a maximum of
32 significant digits, where p is the total number of significant digits (the precision) and s is the number of digits to the right of the decimal point (the
scale).
NCHAR(n)
Unlike the DECIMAL data type, the MONEY data type always is treated as a
fixed-point decimal number. The data type MONEY(p) is defined as
DECIMAL(p,2). If the precision and scale parameters are not specified,
MONEY is interpreted as DECIMAL(16,2).
Values in MONEY columns are displayed with a currency symbol (by default,
a dollar sign) and a decimal point. You can use the following formula
(rounded up to a whole number of bytes) to calculate the byte storage for a
MONEY data type:
If the scale is odd: N = (precision + 4) / 2
If the scale is even: N = (precision + 3) / 2
NCHAR(n)
The NCHAR data type is recognized only when NLS is enabled by setting the
DBNLS environment variable. The NCHAR data type stores any string of letters, numbers, and symbols. A native-character column has a logical size of n
characters, depending on the code set. For the supported European
languages/code sets, the NCHAR data type requires 1 byte per character. The
total size of an NCHAR column cannot exceed 32,767 bytes for the
INFORMIX-OnLine Dynamic Server database server or 32,511 bytes for the
INFORMIX-SE database server. If you do not specify n, NCHAR(1) is assumed.
Native-character columns typically store names, addresses, phone numbers,
and so on. Because the length of this column is fixed, when a native-character
value is retrieved or stored, exactly n bytes of data are transferred. If the value
is shorter than n, the string is extended with spaces to make up the n bytes. If
the value is longer than n, the string is truncated.
An NCHAR value can include tabs, spaces, and other nonprintable characters.
For additional information about nonprintable characters, see Nonprintable
Characters with CHAR on page 3-7.
3-20
NUMERIC(p,s)
NUMERIC(p,s)
The NUMERIC data type is a synonym for fixed-point DECIMAL.
NVARCHAR(m,r)
The NVARCHAR data type is recognized only when NLS is enabled by setting
the DBNLS environment variable. The NVARCHAR data type stores a nativecharacter string of varying length, where m is the maximum size of the column and r is the minimum amount of space reserved for that column,
depending on the code set. The INFORMIX-SE database server does not support this data type.
An NVARCHAR value can include tabs, spaces, and other nonprintable
characters. For additional information about nonprintable characters, see
Nonprintable Characters with NVARCHAR on page 3-22.
Data Types 3-21
NVARCHAR(m,r)
You must specify the maximum size (m) of the NVARCHAR column. The size
of this parameter cannot exceed 255 bytes, although the logical number of
native characters can be smaller. If you are placing an index on an
NVARCHAR column, the maximum size is 254 bytes. You can store shorter,
but not longer, native-character strings than the value you specify.
Specifying the minimum reserved space (r) parameter is optional. This value
can range from 0 to 255 bytes but must be less than the maximum size (m) of
the NVARCHAR column. If you do not specify a minimum space value, it
defaults to 0. Specify this parameter when you initially intend to insert rows
with short or null data in this column but later expect the data to be updated
with longer values.
Although using NVARCHAR economizes on space used in a table, it has no
effect on the size of an index. In an index based on an NVARCHAR column,
each index key has length m, the maximum size of the column.
The database server does not strip an NVARCHAR object of any user-entered
trailing blanks nor does the database server pad the NVARCHAR to the full
length of the column. However, if you specify a minimum reserved space (r)
and some of the data values are shorter than that amount, some of the space
reserved for rows goes unused.
3-22
REAL
REAL
The REAL data type is a synonym for SMALLFLOAT.
SERIAL(n)
The SERIAL data type stores a sequential integer assigned automatically by
the database server when a row is inserted. (For more information on inserting values into SERIAL columns, see Chapter 1 of the Informix Guide to SQL:
Syntax.) You can define only one SERIAL column in a table.
The SERIAL data type is not automatically a unique column. You must apply
a unique index to this column to prevent duplicate serial numbers.
If you are using the interactive schema editor in DB-Access to define the table,
a unique index is applied automatically to a SERIAL column.
The default serial starting number is 1, but you can assign an initial value, n,
when you create or alter the table. You can assign any number greater than 0
as your starting number. The highest serial number you can assign is
2,147,483,647. If you assign a number greater than 2,147,483,647, you receive
a syntax error.
Once a nonzero number is assigned, it cannot be changed. You can, however,
insert a value into a SERIAL column (using the INSERT statement) or reset the
serial value n (using the ALTER TABLE statement), as long as that value does
not duplicate any existing values in the table. When you insert a number into
a SERIAL column or reset the next value of a SERIAL column, your database
server assigns the next number in sequence to the number entered. However,
if you reset the next value of a SERIAL column to a value that is less than the
values already in that column, the next value is computed using the
following formula:
maximum existing value in SERIAL column + 1
For example, if you reset the serial value of the customer_num column in the
customer table to 50 and the highest-assigned customer number is 128, the
next customer number assigned is 129.
A SERIAL data column is commonly used to store unique numeric codes (for
example, order, invoice, or customer numbers). SERIAL data values require 4
bytes of storage.
Data Types 3-23
SMALLFLOAT
SMALLFLOAT
The SMALLFLOAT data type stores single-precision floating-point numbers
with approximately eight significant digits. SMALLFLOAT corresponds to the
float data type in C. The range of values for a SMALLFLOAT data type is the
same as the range of values for the C float data type on your computer.
A SMALLFLOAT data type column typically stores scientific numbers that can
SMALLINT
The SMALLINT data type stores small whole numbers that range from
32,767 to 32,767. The maximum negative number, 32,768, is a reserved
value and cannot be used. The SMALLINT value is stored as a signed binary
integer.
Integer columns typically store counts, quantities, and so on. Because the
SMALLINT data type takes up only 2 bytes per value, arithmetic operations
are performed very efficiently. However, this data type stores a limited range
of values. If the values exceed the range between the minimum and
maximum numbers, the database server does not store the value and
provides you with an error message.
3-24
TEXT
TEXT
The TEXT data type stores any kind of text data. The INFORMIX-SE database
server does not support this data type.
The TEXT data type has no maximum size. A TEXT column has a theoretical
limit of 231 bytes and a practical limit determined by your available disk
storage.
TEXT columns typically store memos, manual chapters, business documents,
program source files, and so on. A data object of type TEXT can contain a combination of printable ASCII characters and the following control characters:
Tabs (CTRL-I)
You can store, retrieve, update, or delete the contents of a TEXT column.
However, you cannot use TEXT data items in arithmetic or string operations,
or assign literals to TEXT items with the SET clause of the UPDATE statement.
You also cannot use TEXT items in the following ways:
You can use TEXT objects in Boolean expressions only if you are testing for
null values.
You can insert data into TEXT columns in the following ways:
You cannot use a quoted text string, number, or any other actual value to
insert or update TEXT columns.
VARCHAR(m,r)
When you select a TEXT column, you can choose to receive all or part of it. To
see all of a column, use the regular syntax for selecting a column into a variable. You also can select any part of a TEXT column by using subscripts, as
shown in the following example:
SELECT cat_descr [1,75] FROM catalog WHERE catalog_num = 10001
This statement reads the first 75 bytes of the cat_descr column associated
with catalog number 10001.
VARCHAR(m,r)
The VARCHAR data type stores a character string of varying length, where m
is the maximum size of the column and r is the minimum amount of space
reserved for that column. The INFORMIX-SE database server does not support
this data type. The VARCHAR data type is the Informix implementation of a
character varying data type. The ANSI standard data type for varying character strings is CHARACTER VARYING described on page 3-8.
You must specify the maximum size (m) of the VARCHAR column. The size of
this parameter can range from 1 to 255 bytes. If you are placing an index on
a VARCHAR column, the maximum size is 254 bytes. You can store shorter,
but not longer, character strings than the value you specify.
Specifying the minimum reserved space (r) parameter is optional. This value
can range from 0 to 255 bytes but must be less than the maximum size (m) of
the VARCHAR column. If you do not specify a minimum space value, it
3-26
VARCHAR(m,r)
defaults to 0. You should specify this parameter when you initially intend to
insert rows with short or null data in this column, but later expect the data to
be updated with longer values.
Although the use of VARCHAR economizes on space used in a table, it has no
effect on the size of an index. In an index based on a VARCHAR column, each
index key has length m, the maximum size of the column.
When you store a VARCHAR value in the database, only its defined characters
are stored. The database server does not strip a VARCHAR object of any userentered trailing blanks, nor does the database server pad the VARCHAR to the
full length of the column. However, if you specify a minimum reserved space
(r) and some data values are shorter than that amount, some space reserved
for rows goes unused.
VARCHAR values are compared to other VARCHAR values and to character
values in the same way that character values are compared. The shorter value
is padded on the right with spaces until the values have equal lengths; then
they are compared for the full length.
400
700
50000
700
The same situation might occur if you attempt to transfer data from FLOAT
or SMALLFLOAT columns to INTEGER, SMALLINT, or DECIMAL columns.
3-28
Figure 3-8
Numeric data type conversion chart
From:
To:
SMALLINT INTEGER SMALLFLOAT
SMALLINT
FLOAT
DECIMAL
OK
OK
OK
OK
INTEGER
OK
OK
SMALLFLOAT
OK
OK
FLOAT
OK
DECIMAL
Legend:
OK = No error
O = An error can occur depending on precision of the decimal
X = An error can occur depending on data
F = No error, but less significant digits might be lost
3-30
Operator
Result
DATE
DATETIME
INTERVAL
DATETIME
DATE
INTERVAL
DATE
+ or
INTERVAL
DATETIME
DATETIME
DATETIME
INTERVAL
DATETIME
+ or
INTERVAL
DATETIME
INTERVAL
DATETIME
DATETIME
INTERVAL
+ or
INTERVAL
INTERVAL
DATETIME
CURRENT
INTERVAL
CURRENT
DATETIME
INTERVAL
INTERVAL
CURRENT
DATETIME
CURRENT
+ or
INTERVAL
DATETIME
DATETIME
+ or
UNITS
DATETIME
INTERVAL
+ or
UNITS
INTERVAL
INTERVAL
or /
NUMBER
INTERVAL
No other combinations are allowed. You cannot add two DATETIME values
because this operation does not produce either a point in time or a span of
time. For example, you cannot add December 25 and January 1, but you can
subtract one from the other to find the time span between them.
If the second DATETIME value has more fields than the first (regardless of
whether the precision of the extra fields is larger or smaller than those in the
first value), the additional fields in the second value are ignored in the
calculation.
In the following expression (and result), the year is not included for the
second value. Therefore, the year is set automatically to the current year, in
this case 1994, and the resulting INTERVAL is negative, indicating that the
second date is later than the first.
DATETIME (1994-9-30) YEAR TO DAY
- DATETIME (10-1) MONTH TO DAY
Result: INTERVAL (1) DAY TO DAY [assuming current year
is 1994]
3-32
Important: Evaluate the logic of your addition or subtraction. Remember that months
can be 28, 29, 30, or 31 days and that years can be 365 or 366 days.
In most situations, the database server automatically adjusts the calculation
when the initial values do not have the same precision. However, in certain
situations, you must explicitly adjust the precision of one value to perform
the calculation. If the INTERVAL value you are adding or subtracting has
fields that are not included in the DATETIME value, you must use the EXTEND
function to explicitly extend the field qualifier of the DATETIME value. (For
more information on the EXTEND function, see the Expression segment in
Chapter 1 of the Informix Guide to SQL: Syntax.) For example, you cannot subtract a minute INTERVAL value from the DATETIME value in the previous
example that has a YEAR TO DAY field qualifier. You can, however, use the
EXTEND function to perform this calculation, as shown in the following
example:
EXTEND (DATETIME (1994-8-1) YEAR TO DAY, YEAR TO MINUTE)
- INTERVAL (720) MINUTE(3) TO MINUTE
Result: DATETIME (1994-07-31 12:00) YEAR TO MINUTE
Result
DATE - DATETIME
INTERVAL
DATETIME - DATE
INTERVAL
DATE + or - INTERVAL
DATETIME
In the cases shown in Figure 3-10, DATE values are first converted to their
corresponding DATETIME equivalents, and then the expression is computed
normally.
Although you can interchange DATE and DATETIME values in many
situations, you must indicate whether a value is a DATE or a DATETIME data
type. A DATE value can come from the following sources:
3-34
A DATETIME literal
When you represent DATE and DATETIME values as quoted character strings,
the fields in the strings must be in proper order. In other words, when a DATE
value is expected, the string must be in DATE format and when a DATETIME
value is expected, the string must be in DATETIME format. For example, you
can use the string '10/30/1994' as a DATE string but not as a DATETIME
string. Instead, you must use '1994-10-30' or '94-10-30' as the DATETIME
string.
You also can subtract one DATE value from another DATE value, but the
result is a positive or negative INTEGER value rather than an INTERVAL
value. If an INTERVAL value is required, you can either convert the INTEGER
value into an INTERVAL value or one of the DATE values into a DATETIME
value before subtracting.
For example, the following expression uses the DATE() function to convert
character string constants to DATE values, calculates their difference, and
then uses the UNITS DAY keywords to convert the INTEGER result into an
INTERVAL value:
(DATE ('5/2/1994') - DATE ('4/6/1955')) UNITS DAY
Result: INTERVAL (12810) DAY(5) TO DAY
If you need YEAR TO MONTH precision, you can use the EXTEND function on
the first DATE operand, as shown in the following example:
EXTEND (DATE ('5/2/1994'), YEAR TO MONTH) DATE ('4/6/1955')
Result: INTERVAL (35-01) YEAR TO MONTH
Note that the resulting INTERVAL precision is YEAR TO MONTH because the
DATETIME value came first. If the DATE value had come first, the resulting
INTERVAL precision would have been DAY(5) TO DAY.
Note the use of numeric qualifiers to alert the database server that the
MINUTE and FRACTION in the first value and the SECOND in the second
value exceed the default number of digits.
When you add or subtract INTERVAL values, the second value cannot have a
field with greater precision than the first. The second INTERVAL, however,
can have a field of smaller precision than the first. For example, the second
INTERVAL can be HOUR TO SECOND when the first is DAY TO HOUR. The
additional fields (in this case MINUTE and SECOND) in the second INTERVAL
value are ignored in the calculation.
3-36
Chapter
Environment Variables
4-5
.
.
.
.
.
.
.
.
.
.
4-6
4-6
.
.
.
.
.
.
.
.
.
.
4-6
4-7
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4-8
4-8
4-9
4-9
4-9
Rules of Precedence
4-10
.
.
.
.
.
.
.
.
.
.
4-11
4-11
4-11
4-12
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4-15
4-15
4-15
4-16
4-17
4-18
4-18
4-19
4-20
4-20
Environment Variables . . . . . . .
ARC_DEFAULT . . . . . . . .
ARC_KEYPAD . . . . . . . . .
COLLCHAR . . . . . . . . . .
Using pre-Version 6.0 SQL APIs. .
Using Version 6.0 or Later SQL APIs
DBANSIWARN. . . . . . . . .
DBAPICODE . . . . . . . . .
Creating Mapping Files . . . .
DBBLOBBUF . . . . . . . . .
DBDATE . . . . . .
DBDELIMITER . . . .
DBEDIT . . . . . .
DBLANG . . . . . .
DBMONEY . . . . .
DBNLS. . . . . . .
DBPATH . . . . . .
DBPRINT . . . . . .
DBREMOTECMD . . .
DBSPACETEMP . . .
DBTEMP . . . . . .
DBTIME . . . . . .
DBUPSPACE. . . . .
DELIMIDENT . . . .
ENVIGNORE . . . .
FET_BUF_SIZE . . . .
INFORMIXC. . . . .
INFORMIXCOB . . .
INFORMIXCOBDIR . .
INFORMIXCOBSTORE .
INFORMIXCOBTYPE .
INFORMIXCONRETRY .
INFORMIXCONTIME .
INFORMIXDIR . . . .
INFORMIXSERVER . .
INFORMIXSHMBASE .
INFORMIXSTACKSIZE .
INFORMIXTERM . . .
LANG . . . . . . .
LC_COLLATE . . . .
LC_CTYPE . . . . .
LC_MONETARY . . .
LC_NUMERIC . . . .
LC_TIME . . . . . .
ONCONFIG . . . . .
4-2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4-21
4-23
4-23
4-24
4-25
4-26
4-28
4-31
4-32
4-33
4-34
4-34
4-37
4-38
4-38
4-39
4-40
4-40
4-41
4-42
4-43
4-43
4-44
4-46
4-46
4-47
4-48
4-49
4-49
4-51
4-53
4-55
4-56
4-57
4-59
OPTCOMPIND .
PATH . . . .
PDQPRIORITY .
PSORT_DBTEMP
PSORT_NPROCS
SQLEXEC . . .
SQLRM. . . .
SQLRMDIR . .
TERM . . . .
TERMCAP . .
TERMINFO . .
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
4-59
4-60
4-61
4-62
4-63
4-64
4-65
4-65
4-66
4-66
4-67
4-68
Environment Variables
4-3
4-4
In an environment-configuration file
In a login file
4-6
.login or .cshrc
.profile
When you set an environment variable in your .login, .cshrc, or .profile file,
it is assigned automatically every time you log in to the system.
Bourne shell
ABCD=value
export ABCD
Korn shell:
ABCD=value
export ABCD
Korn shell:
export ABCD=value
Note that Korn-shell syntax allows for a shortcut, as shown in the last line of
Figure 4-1.
The following diagram shows how the syntax for setting an environment
variable is represented throughout this chapter. These diagrams indicate the
setting for the C shell; for the Bourne or Korn shell, use the syntax shown in
Figure 4-1.
setenv
ABCD
value
4-8
env
UNIX System V:
printenv
unsetenv ABCD
Bourne shell or
or Korn shell:
unset ABCD
Rather than entering an explicit path name, you can use the value of the
INFORMIXDIR environment variable (the $INFORMIXDIR variable), as
shown in the following example,
setenv INFORMIXDIR /usr/informix
setenv PATH $INFORMIXDIR/bin:$PATH
Rules of Precedence
You might prefer to use this version to ensure that your PATH entry does not
contradict the path that was set in INFORMIXDIR and so that you do not have
to reset PATH whenever you change INFORMIXDIR.
If you set the PATH environment variable on the C shell command line, you
might need to include curly braces with the existing INFORMIXDIR and
PATH, as shown in the following command:
setenv PATH ${INFORMIXDIR}/bin:${PATH}
Rules of Precedence
When an Informix product accesses an environment variable, normally the
following rules of precedence apply:
1.
2.
3.
4.
If NLS is activated, an exception exists to these rules. The setting for any of
the LC_* environment variables (LC_COLLATE, LC_CTYPE, LC_MONETARY,
LC_NUMERIC, LC_TIME) takes precedence over the setting for the LANG
environment variable, no matter where they are set. For more information,
see the discussion beginning on page 4-11.
4-10
2.
3.
4.
5.
6.
7.
Restrictions
Page
ARC_DEFAULT
OnLine only
4-15
ARC_KEYPAD
OnLine only
4-15
COLLCHAR
4-16
DBANSIWARN
4-18
DBAPICODE
4-19
DBBLOBBUF
OnLine only
4-20
DBDATE
4-21
DBDELIMITER
4-23
DBEDIT
4-23
DBLANG
4-24
DBMONEY
4-25
DBNLS
4-26
DBPATH
4-28
DBPRINT
4-31
DBREMOTECMD
OnLine only
4-32
DBSPACETEMP
OnLine only
4-33
DBTEMP
SE only
4-34
DBTIME
4-34
(1 of 3)
4-12
Environment Variable
Restrictions
Page
DBUPSPACE
4-37
DELIMIDENT
4-38
ENVIGNORE
4-38
FET_BUF_SIZE
4-39
INFORMIXC
ESQL/C only
4-40
INFORMIXCOB
ESQL/COBOL only
4-40
INFORMIXCOBDIR
ESQL/COBOL only
4-41
INFORMIXCOBSTORE
ESQL/COBOL only
4-42
INFORMIXCOBTYPE
ESQL/COBOL only
4-43
INFORMIXCONRETRY
4-43
INFORMIXCONTIME
4-44
INFORMIXDIR
4-46
INFORMIXSERVER
4-46
INFORMIXSHMBASE
OnLine only
4-47
INFORMIXSTACKSIZE
OnLine only
4-48
INFORMIXTERM
DB-Access only
4-49
LANG
4-49
LC_COLLATE
4-51
LC_CTYPE
4-53
LC_MONETARY
4-55
LC_NUMERIC
4-56
LC_TIME
4-57
OPTCOMPIND
OnLine only
4-59
ONCONFIG
OnLine only
4-59
(2 of 3)
Environment Variables 4-13
Environment Variable
Restrictions
Page
4-60
PATH
PDQPRIORITY
OnLine only
4-61
PSORT_DBTEMP
OnLine only
4-62
PSORT_NPROCS
OnLine only
4-63
4-64
SQLEXEC
SQLRM
(obsolete)
4-65
SQLRMDIR
(obsolete)
4-65
TERM
4-66
TERMCAP
4-66
TERMINFO
4-67
(3 of 3)
4-14
Environment Variables
Environment Variables
The following sections discuss the environment variables used by Informix
products.
ARC_DEFAULT
When you use the ON-Archive archive and tape-management system for the
INFORMIX-OnLine Dynamic Server, you can set the ARC_DEFAULT environment variable to indicate where a personal default qualifier file is located.
setenv
pathname
ARC_DEFAULT
pathname
ARC_KEYPAD
If you use the ON-Archive archive and tape-management system for the
INFORMIX-OnLine Dynamic Server, you can set your ARC_KEYPAD environment variable to point to a tctermcap file that is different from the default
tctermcap file. The default is the $INFORMIXDIR/etc/tctermcap file, and it
contains instructions on how to modify the tctermcap file.
COLLCHAR
The tctermcap file serves the following purposes for the ON-Archive menu
interface:
It defines the characters used in drawing menus and borders for an API.
setenv
pathname
pathname
ARC_KEYPAD
For example, to set the ARC_KEYPAD environment variable to specify the file
/usr/jane/tctermcap.janeroe enter the following command:
setenv ARC_KEYPAD /usr/jane/tctermcap.janeroe
COLLCHAR
The optional COLLCHAR environment variable allows existing SQL API
programs to take advantage of the NLS collation feature without modification. You must set DBNLS to 1 or 2 if you want to use COLLCHAR.
setenv
COLLCHAR
4-16
COLLCHAR
Using pre-Version 6.0 SQL APIs
When COLLCHAR is set to 1, applications built using pre-Version 6.0 SQL
APIs linked with the Version 6.0 or later libraries can create and sort CHAR
data using the collation sequence set when an NLS database is created (the
NCHAR data type), without changing any code.
During execution, the INFORMIX-OnLine Dynamic Server performs the
following actions:
DBANSIWARN
Using Version 6.0 or Later SQL APIs
When you use Version 6.0 or later to create an NLS database or to create an
application and access an NLS database using an INFORMIX-ESQL/C or
INFORMIX-ESQL/COBOL application or DB-Access, the following restrictions
apply:
Important: Direct access to the system catalog might result in an error for an
application built with an SQL API prior to Version 6.0 or later because the data types
are not mapped. For example, a SELECT on a system catalog table might show a
column as NCHAR whereas it might otherwise appear as CHAR.
DBANSIWARN
Setting the DBANSIWARN environment variable indicates that you want to
check for Informix extensions to ANSI standard syntax. Unlike most environment variables, you do not need to set DBANSIWARN to a valuesetting it
to any value or to no value, as shown in the following diagram, is sufficient:
setenv
DBANSIWARN
DBAPICODE
DBAPICODE
The DBAPICODE environment variable lets systems that use nonstandard or
rare code sets access databases that store data using a standard code set. Set
DBAPICODE to let applications on different platforms use a different code set
than the one stored in and used by the database server.
With DBAPICODE set, the applications communicate with the database
server using the standard ASCII code set, but interact with the keyboard, terminal display, and program character strings using the code set specified in
DBAPICODE.
codeset_name
setenv
DBAPICODE
codeset_name
To use a specific DBAPICODE setting, there must be a mapping file for that
code set in the message directory. For example, for an NLS-ready ESQL/C
application to use the code set specified in the following command with an
NLS database created with the code set FR_fr.646, there must be a mapping
file called mFR_fr.646 in the message directory $INFORMIXDIR/msg, or the
directory must be pointed to by the DBLANG or LANG setting:
setenv DBAPICODE mFR_fr.646
DBBLOBBUF
DBBLOBBUF
The DBBLOBBUF environment variable controls whether a blob is stored
temporarily in memory or in a file while being unloaded with the UNLOAD
statement.
setenv
DBBLOBBUF
If the blob is smaller than the default of 10 kilogytes or the setting of the
DBBLOBBUF environment variable, it is temporarily stored in memory. If the
blob is larger than the default or the setting of the environment variable, it is
written to a temporary file. This environment variable applies to the
UNLOAD command only.
For instance, to set a buffer size of 15 kilobytes, set the DBBLOBBUF environment variable, as shown in the following example:
setenv DBBLOBBUF 15
In the example, any blobs smaller than 15 kilobytes are stored temporarily in
memory. Blobs larger than 15 kilobytes are stored temporarily in a file.
4-20
DBDATE
DBDATE
The DBDATE environment variable specifies the display formats of date
values. You can specify the following attributes:
setenv
Whether the year should be printed with two digits (Y2) or four
digits (Y4)
DBDATE
Y4
Y2
Y4
Y2
/
.
0
-, . /
0
D, M
Y2, Y4
The default setting for DBDATE is MDY4/, where M represents the month,
D represents the day, Y4 represents a four-digit year, and slash (/) is a
separator (for example, 10/08/1994).
Other acceptable characters for the separator are a hyphen (-), a period (.), or
a zero (0). Use the zero to indicate no separator.
The slash (/) appears if you attempt to use a character other than a hyphen,
period, or zero as a separator, or if you do not include a separator character
in the DBDATE definition.
DBDATE
MDY4/
10/08/1994
DMY2-
08-10-94
MDY4
10/08/1994
Y2DM.
94.08.10
MDY20
100894
Y4MD*
1994/10/08
Notice that the formats Y4MD* (unacceptable separator defined) and MDY4 (no
separator defined) both display the default (slash) as a separator.
4-22
DBDELIMITER
DBDELIMITER
The DBDELIMITER environment variable specifies the field delimiter used
by the dbexport utility and with the LOAD and UNLOAD statements.
setenv
DBDELIMITER
delimiter
'delimiter'
The delimiter can be any single character, except the characters in the following list:
NEWLINE or CTRL-J
The vertical bar (|=ASCII 124) is the default. To change the field delimiter to
a plus (+), set the DBDELIMITER environment variable, as shown in the
following example:
setenv DBDELIMITER ' +'
DBEDIT
The DBEDIT environment variable lets you name the text editor you want to
use to work with SQL statements and command files in DB-Access. If DBEDIT
is set, the specified editor is called directly. If DBEDIT is not set, you are
prompted to specify an editor as the default for the rest of the session.
setenv
editor
DBEDIT
editor
DBLANG
For most systems, the default editor is vi. If you use another editor, be sure
that it creates flat ASCII files. Some word processors in document mode introduce printer control characters that can interfere with operation of your
Informix product.
To specify the EMACS text editor, set the DBEDIT environment variable by
entering the following command:
setenv DBEDIT emacs
DBLANG
The DBLANG environment variable specifies the subdirectory of
$INFORMIXDIR or the full pathname of the directory that contains the
compiled message files used by your application.
setenv
DBLANG
relative_path
full_path
relative_path
full_path
4-24
1.
2.
Set the owner and group of the subdirectory to informix and the
access permission for this directory to 755.
3.
4.
DBMONEY
To use NLS, you can set DBLANG to indicate the subdirectory under
$INFORMIXDIR/msg in which the message files for each supported native
language reside. For example, set DBLANG for your product to use the
French message files by entering the following command:
setenv DBLANG french
2.
3.
See the discussion of the LANG environment variable on page 4-49 for
information on how to select a language environment for your product when
NLS functionality is enabled.
DBMONEY
The DBMONEY environment variable specifies the display format for money
values.
setenv
$
,
.
DBMONEY
'$'
front
back
DBNLS
back
front
represents the optional symbol that follows the money value. The
back symbol can be up to seven characters and can contain any
character except a comma or a period. If back contains a dollar
sign ($), you must enclose the whole string in single quotes (').
is the optional symbol that precedes the money value. The front
symbol can be up to seven characters and can contain any character except a comma or a period. If front contains a dollar sign
($), you must enclose the whole string in single quotes (').
If you use any character except an alphabetic character for front or back, you
must enclose the character in quotes.
The default setting for DBMONEY is where a dollar sign ($) precedes the
money value, a period (.) separates the integral from the fractional part of the
money value, and no back symbol appears. For example, 10050 is formatted
as $100.50.
Suppose you want to represent money values in DM (Deutsche Mark), which
uses the currency symbol DM and a comma. Set the DBMONEY environment
variable by entering the following command:
setenv DBMONEY DM,
Here, DM is the currency symbol preceding the money value, and a comma
separates the integral from the fractional part of the money value. As a result,
the amount 10050 is displayed as DM100,50.
The contents of a declared DBMONEY environment variable take precedence
over the contents of the LC_MONETARY variable that can be set for NLS.
However, the LC_MONETARY setting takes precedence over the default
DBMONEY format. See the discussion of LC_MONETARY on page 4-55.
DBNLS
Set the DBNLS environment variable to activate NLS functionality in your
Informix products. If DBNLS is not set, the settings for the other NLS
environment variables listed in this section do not take effect.
setenv
DBNLS
1
2
4-26
DBNLS
To enable NLS functionality in Version 6.0 or later products, set the DBNLS
environment variable to the value 1 by entering the following command:
setenv DBNLS 1
Important: A database created after DBNLS is set in an NLS database can be accessed
only by applications running in a correctly set environment.
If you want to use a pre-Version 6.0 Informix product with a Version 6.0 or
later database server, set DBNLS to 2. This allows, for example, existing
INFORMIX-4GL or pre-Version 6.0 INFORMIX-ESQL/C programs to access NLS
databases and obtain proper sorting and collation of character data types
from the database server. Setting DBNLS to 2 also allows Version 6.0 or later
NLS applications with different locales to access an NLS database.
The following table describes what happens if you create or access an NLS
database with Version 6.0 or later ESQL/C, ESQL/COBOL, or DB-Access:
If DBNLS Is Set to 1
If DBNLS Is Set to 2
If needed, you can deactivate the DBNLS environment variable with either of
the following commands:
setenv DBNLS
unsetenv DBNLS
When using DB-Access, you can infer whether DBNLS is set through the
Session option of the DB-Access main menu. If DBNLS is set, the screen shows
NLS capabilities and attributes; if DBNLS is not set, no NLS capabilities are
listed. See Chapter 6 in the DB-Access User Manual for details.
DBPATH
DBPATH
Use DBPATH to identify the database servers that contain databases (if you
are using the INFORMIX-OnLine Dynamic Server), or the directories and/or
database servers that contain databases (if you are using INFORMIX-SE ). The
DBPATH environment variable also specifies a list of directories (in addition
to the current directory) in which DB-Access looks for command scripts (.sql
files).
The CONNECT, DATABASE, START DATABASE, and DROP DATABASE
statements use DBPATH to locate the database under two conditions:
DBPATH
/ full_pathname
// servername / full_pathname
// servername
full_pathname
servername
DBPATH
DBPATH
environment variable. (See page 4-46.) For instance, with the previous
example, if INFORMIXSERVER is set to quality, the DBPATH value is
interpreted as shown in the following example, where the double slash
precedes the database server name:
setenv DBPATH //quality/usr/joachim://quality/usr/sonja
Specifying a Servername
You can set DBPATH to contain only database server names. This allows you
to locate only databases and not locate command files.
The OnLine or SE administrator must include each database server
mentioned by DBPATH in the $INFORMIXDIR/etc/sqlhosts file. For information on communication-configuration files and dbservernames, see the
INFORMIX-OnLine Dynamic Server Administrators Guide or the INFORMIX-SE
Administrators Guide.
For example, if INFORMIXSERVER is set to quality, you can search for an
INFORMIX-OnLine Dynamic Server database first on the quality database
server and then on the marketing database server by setting DBPATH shown
in the following example:
setenv DBPATH //marketing
If you are using DB-Access in this example, the names of all the databases on
the quality and marketing database servers are displayed with the Select
option of the Database menu.
4-30
DBPRINT
For INFORMIX-SE, you can set DBPATH to contain only the database server
names (and no directory names) if you want to locate databases and not
command scripts.
DBPRINT
The DBPRINT environment variable specifies the printing program that you
want to use.
setenv
program
DBPRINT
program
Set the DBPRINT environment variable to specify the myprint print program
by entering the following command:
setenv DBPRINT myprint
DBREMOTECMD
DBREMOTECMD
You can set the DBREMOTECMD environment variable to override the
default remote shell used when you perform remote tape operations with the
INFORMIX-OnLine Dynamic Server. Set it using either a simple command or
the full pathname. If you use the full pathname, the database server searches
your PATH for the specified command.
setenv
DBREMOTECMD
command
pathname
command
pathname
Informix highly recommends the use of the full pathname syntax on the
interactive UNIX platform to avoid problems with similar-named programs
in other directories and possible confusion with the restricted shell
(/usr/bin/rsh).
Set the DBREMOTECMD environment variable for a simple command name
by entering the following command:
setenv DBREMOTECMD rcmd
4-32
DBSPACETEMP
DBSPACETEMP
If you are using OnLine, you can set your DBSPACETEMP environment
variable to specify dbspaces for building temporary tables and for holding
the temporary files used for sorting. You can specify multiple dbspaces to
spread temporary space across any number of disks.
punct
setenv
DBSPACETEMP
punct
temp_dbspace
temp_dbspace
Separate the dbspace entries with either colons or commas. The number of
dbspaces is limited by the maximum size of the environment variable, as
defined by the UNIX shell.
If you do not set the DBSPACETEMP environment variable, the default is the
root dbspace unless you create your temporary table with the CREATE TEMP
TABLE statement, in which case the default is the dbspace that contains the
database for the temporary table. If the dbspace named by the environment
variable not exist, OnLine uses the root dbspace. OnLine does not create a
new dbspace with the given name.
For sorting space, OnLine uses the following disk space for writing
temporary information, in the following order:
1.
2.
DBTEMP
3.
4.
DBTEMP
Set the DBTEMP environment variable to specify the full pathname of the
directory into which you want INFORMIX-SE or INFORMIX-Gateway
products to place its temporary files and temporary tables.
setenv
pathname
DBTEMP
pathname
If you do not set DBTEMP, temporary files are created in /tmp. If DBTEMP is
not set, temporary tables are created in the directory of the database (that is,
the .dbs directory).
OnLine uses DBSPACETEMP to specify the location of temporary files.
DBTIME
You can set the DBTIME environment variable to manipulate DATETIME
formats so the formats conform more closely to various international or local
TIME conventions. DBTIME takes effect only when you call certain
INFORMIX-ESQL/C or INFORMIX-ESQL/COBOL DATETIME routines;
otherwise, use the DBDATE environment variable. (See the
INFORMIX-ESQL/C Programmers Manual or the INFORMIX-ESQL/COBOL
Programmers Manual for details.)
4-34
DBTIME
You can set DBTIME to specify the exact format of an input/output (I/O)
DATETIME string field by using the formatting directives described in the following list. Otherwise, the behavior of the DATETIME formatting routine is
undefined.
setenv
string
DBTIME
'string'
the formatting directives that you can use to create the formatting
are described in the following list:
%b
%B
%d
%Fn
is replaced by the value of the fraction with precision specified by the integer n. The default value of n is 2; the range
of n is 0 n 5.
%H
%I
%M
%m
%p
%S
%y
%Y
%%
DBTIME
For example, to convert a DATETIME year TO second to the ASCII string format
shown in the following example:
Mar 21, 1994 at 16 h 30 m 28 s
The default DBTIME produces the conventional ANSI SQL string format
shown in the following line:
1994-03-21 16:30:28
.p
When you use field width and precision specifications, the following
limitations apply:
4-36
DBUPSPACE
The F conversion does not follow the field width and precision format
conversions described earlier.
See the discussion of DBDATE and LC_TIME on pages 4-21 and 4-57,
respectively, for related information.
DBUPSPACE
The DBUPSPACE environment variable lets you specify and constrain the
amount of system disk space that the UPDATE STATISTICS statement can use
when trying to simultaneously construct multiple column distributions.
setenv
value
DBUPSPACE
value
Then no more than 2,500 kilobytes of disk space can be used during the
execution of an UPDATE STATISTICS statement. If a table requires 5 megabytes of disk space for sorting, then UPDATE STATISTICS accomplishes the
task in two passes; the distributions for one half of the columns are constructed with each pass.
If you try to set DBUPSPACE to any value less than 1,024 kilobytes, it is
automatically set to 1,024 kilobytes, but no error message is returned. If this
value is not large enough to allow more than one distribution to be constructed at a time, at least one distribution is done, even if the amount of disk
space required for the one is greater than specified in DBUPSPACE.
DELIMIDENT
DELIMIDENT
The DELIMIDENT environment variable specifies that strings set off by
double quotes are delimited identifiers.
setenv
DELIMIDENT
You can use delimited identifiers to specify identifiers that are identical to
reserved keywords, such as TABLE or USAGE. You can also use them to specify database identifiers that contain nonalpha characters, but you cannot use
them to specify storage identifiers that contain non-alpha characters. Note
that database identifiers are names for database objects such as tables and
columns, and storage identifiers are names for storage objects such as
dbspaces and blobspaces.
Delimited identifiers are case-sensitive.
To use delimited identifiers, applications in ESQL /C and ESQL /COBOL must
set the DELIMIDENT environment variable at compile time and execute time.
ENVIGNORE
Use the ENVIGNORE environment variable to deactivate specified
environment variable entries in the common (shared) and private
environment-configuration files, informix.rc and .informix respectively.
:
setenv
variable
4-38
ENVIGNORE
variable
FET_BUF_SIZE
FET_BUF_SIZE
The FET_BUF_SIZE environment variable lets you override the default setting
for the size of the fetch buffer for all data except blobs. When set,
FET_BUF_SIZE is effective for the entire environment.
setenv
FET_BUF_SIZE
When set to a valid value, the environment variable overrides the previously
set value. The default setting for the fetch buffer is dependent on row size.
If the buffer size is set to less than the default size or is out of the range of the
small integer value, no error is raised. The new buffer size is ignored.
For example, to set a buffer size to 5,000, set the FET_BUF_SIZE environment
variable by entering the following command:
setenv FET_BUF_SIZE 5000
INFORMIXC
INFORMIXC
The INFORMIXC environment variable specifies the name or pathname of the
C compiler to be used to compile files generated by INFORMIX-ESQL/C. If
INFORMIXC is not set, the default compiler is cc.
setenv
compiler
INFORMIXC
pathname
compiler
pathname
For example, to specify the GNU C compiler, enter the following command:
setenv INFORMIXC gcc
INFORMIXCOB
The INFORMIXCOB environment variable specifies the program name of the
COBOL compiler that you use with INFORMIX-ESQL/COBOL. It identifies the
command that calls up the compiler environment. You must set this environment variable before you compile your ESQL/COBOL program.
setenv
program
INFORMIXCOB
program
4-40
Compiler manufacturer
Micro Focus
Ryan-McFarland (Liant)
INFORMIXCOBDIR
INFORMIXCOBDIR
The INFORMIXCOBDIR environment variable specifies the directory where
the COBOL compiler resides. You must set this environment variable before
you compile your INFORMIX-ESQL/COBOL program and create the run-time
product.
setenv
dirname
INFORMIXCOBDIR
dirname
INFORMIXCOBSTORE
INFORMIXCOBSTORE
The INFORMIXCOBSTORE environment variable applies only to the Micro
Focus (MF) COBOL/2 environment. It specifies the type of storage to use during compilation. You must set INFORMIXCOBSTORE before you compile
your INFORMIX-ESQL/COBOL program and create the run-time product.
setenv
INFORMIXCOBSTORE
byte
word
byte
word
4-42
INFORMIXCOBTYPE
INFORMIXCOBTYPE
The INFORMIXCOBTYPE environment variable specifies a code that
identifies the manufacturer of your COBOL compiler. You must set
INFORMIXCOBTYPE before you compile an INFORMIX-ESQL/COBOL
program and create the run-time product.
setenv
type
INFORMIXCOBTYPE
type
INFORMIXCONRETRY
The INFORMIXCONRETRY environment variable specifies the maximum
number of additional connection attempts that should be made to each server
by the client during the time limit specified by the INFORMIXCONTIME
environment variable.
Set the INFORMIXCONRETRY environment variable as shown in the
following syntax:
setenv
value
INFORMIXCONRETRY
value
INFORMIXCONTIME
The default value for INFORMIXCONRETRY is one retry after the initial
connection attempt. The INFORMIXCONTIME setting, described in the
following section, takes precedence over the INFORMIXCONRETRY setting.
INFORMIXCONTIME
The INFORMIXCONTIME environment variable lets you specify that an SQL
CONNECT statement should keep trying for at least the given number of seconds before returning an error.
You might encounter connection difficulties related to system or network
load problems. For instance, if the database server is busy establishing new
SQL client threads, some clients might fail because the server cannot issue a
network function call fast enough. The INFORMIXCONTIME and
INFORMIXCONRETRY environment variables let you configure your clientside connection capability to retry the connection instead of returning an
error.
Set the INFORMIXCONTIME environment variable as shown in the following
syntax:
setenv
value
INFORMIXCONTIME
value
4-44
INFORMIXCONTIME
The default value for INFORMIXCONTIME is 15 seconds. The INFORMIXCONTIME setting takes precedence over the INFORMIXCONRETRY setting;
retry efforts could end after the INFORMIXCONTIME value has been
exceeded, but before the INFORMIXCONRETRY value has been reached.
INFORMIXDIR
INFORMIXDIR
The INFORMIXDIR environment variable specifies the directory that
contains the subdirectories in which your product files are installed.
You must always set INFORMIXDIR. If you have multiple versions of the
INFORMIX-OnLine Dynamic Server or INFORMIX-SE database server, set
INFORMIXDIR to the appropriate directory name for the version that you
want to access. For information about when to set the INFORMIXDIR
environment variable, see the UNIX Products Installation Guide.
setenv
pathname
INFORMIXDIR
pathname
INFORMIXSERVER
The INFORMIXSERVER environment variable specifies the default database
server to which an explicit or implicit connection is made by an SQL API client
or the DB-Access utility. The database server can be either INFORMIX-OnLine
Dynamic Server or INFORMIX-SE and can be either local or remote. You must
always set INFORMIXSERVER before using an Informix product.
setenv
dbservername
INFORMIXSERVER
dbservername
INFORMIXSHMBASE
INFORMIXSHMBASE
The INFORMIXSHMBASE environment variable affects only client
applications connected to an INFORMIX-OnLine Dynamic Server using the
IPC shared-memory (ipcshm) communication protocol.
value
setenv
INFORMIXSHMBASE
value
INFORMIXSTACKSIZE
INFORMIXSTACKSIZE
INFORMIXSTACKSIZE specifies the stack size (in kilobytes) that OnLine uses
for a particular client session. Use INFORMIXSTACKSIZE to override the
value of the ONCONFIG parameter STACKSIZE for a particular application or
user.
setenv
value
INFORMIXSTACKSIZE
value
If INFORMIXSTACKSIZE is not set, the stack size is taken from the OnLine
configuration parameter STACKSIZE, or it defaults to a platform-specific
value. The default stack size value for the primary thread for an SQL client is
32 kilobytes for nonrecursive database activity.
4-48
INFORMIXTERM
INFORMIXTERM
The INFORMIXTERM environment variable specifies whether DB-Access
should use the information in the termcap file or the terminfo directory. The
termcap and terminfo files determine terminal-dependent keyboard and
screen capabilities such as the operation of function keys, color and intensity
attributes in screen displays, and the definition of window border and
graphics characters.
setenv
INFORMIXTERM
termcap
terminfo
LANG
Set the UNIX LANG environment variable to select the specific language
environment (or locale) for your Informix products. The LANG setting implies
certain default values for the language environment that you can modify or
override by setting various LC_* environment variables. The setting for the
LC_* environment variables always takes precedence over the LANG setting.
For example, if a LANG setting for French is specified in the shell and
LC_COLLATE is set for German in an environment-configuration file, the
LC_COLLATE setting takes precedence. If LANG is not set, the default value
LANG
language
LANG
_territory
.codeset
@modifier
_territory
language
.codeset
@modifier
Valid settings for the .codeset, language, @modifier, and _territory fields might
vary among operating systems. They are not standardized and thus might
not be supported by individual X/Open systems. Example settings in this
section use a particular implementation for consistency but do not imply a
specific naming convention.
The LANG information is transmitted with the request for database service
when the database connection is established. The database server uses the
information to set up the proper environment or to reject the service request
if a potential exists for data inconsistency when a database connection is
established with another database server.
4-50
LC_COLLATE
The setting for the LANG environment variable identifies the active language
and code set of the database application when the NLS functionality is
enabled. This value is used throughout the life of the database to ensure the
proper use of code sets.
Set the LANG environment variable to French by entering the following
command:
setenv LANG FR
You also can set the Informix environment variable DBLANG to indicate the
subdirectory under $INFORMIXDIR/msg in which the message files for each
supported native language reside. See the discussion of the DBLANG environment variable on page 4-24 for more information.
When using DB-Access, you can see the LANG setting and the mode (NLS or
non-NLS) through the Session option on the DB-Access main menu. See
Chapter 6 in the DB-Access User Manual for details.
LC_COLLATE
Set the LC_COLLATE environment variable to specify the collation sequence
for regular expressions and character string comparison operations and to
ensure the proper use of code sets.
setenv
LC_COLLATE
language
_territory
.codeset
@modifier
.codeset
@modifier
LC_COLLATE
_territory
language
Valid settings for the .codeset, language, @modifier, and _territory fields might
vary among operating systems. They are not standardized and thus might
not be supported by individual X/Open systems. Example settings in this
section use a particular implementation for consistency but do not imply a
specific naming convention.
The database server saves the LC_COLLATE setting when you create a
database. The LC_COLLATE setting is used throughout the lifetime of the
database. If LC_COLLATE is not set, the default is the value set for the LANG
environment variable. If LANG is not set, the default value is C. If
LC_COLLATE is set, this value has the following consequences:
4-52
LC_CTYPE
For example, you can set the LC_COLLATE environment variable to specify
the dictionary order as implemented in the Swiss version (CH) of the German
language (DE) by entering the following command:
setenv LC_COLLATE DE_ch@dict
You can set the LC_COLLATE environment variable to specify the German
telephone-book sorting order by entering the following command:
setenv LC_COLLATE DE@telephone
When using DB-Access, you can see the LC_COLLATE setting and the mode
(NLS or non-NLS) for the application through the Session option of the
DB-Access main menu. In addition, the Nls option of the DATABASE INFO
menu shows the LC_COLLATE information stored in the active database. See
Chapters 4 and 6 in the DB-Access User Manual for details.
LC_CTYPE
Set the LC_CTYPE environment variable to specify various character
attributes such as the character classification and case conversion of regular
expressions and character-evaluation functions, and to ensure the proper use
of code sets. The LC_CTYPE setting determines character attributes such as
spaces, punctuation, uppercase letters, and so on.
setenv
LC_CTYPE
language
_territory
.codeset
@modifier
.codeset
@modifier
LC_CTYPE
_territory
language
Valid settings for the .codeset, language, @modifier, and _territory fields might
varyamong operating systems. They are not standardized and thus might not
be supported by individual X/Open systems. Example settings in this section
use a particular implementation for consistency but do not imply a specific
naming convention.
The database server saves the LC_CTYPE setting when you create the database. The LC_CTYPE setting is used throughout the lifetime of the database.
For example, set the LC_CTYPE environment variable to specify the Swiss cultural conventions and the ISO 6937:1983 code set by entering the following
command:
setenv LC_CTYPE FR_ch.6937
If LC_CTYPE is not set, the default is the value set for the LANG environment
variable. If LANG is not set, the default value is C.
When using DB-Access, you can see the LC_CTYPE setting and the mode
(NLS or non-NLS) through the Session option of the DB-Access main menu. In
addition, the Nls option on the DATABASE INFO menu shows the LC_CTYPE
information stored in the active database. See Chapters 4 and 6 in the
DB-Access User Manual for details.
4-54
LC_MONETARY
LC_MONETARY
The LC_MONETARY environment variable defines the rules and symbols
used to format monetary values. Use it to specify the format for the national
currency symbol, including its position within a numeric value, and the
money format.
setenv
LC_MONETARY
language
_territory
.codeset
@modifier
_territory
language
.codeset
@modifier
Valid settings for the .codeset, language, @modifier, and _territory fields might
vary among operating systems. They are not standardized and thus might
not be supported by individual X/Open systems. Example settings in this
section use a particular implementation for consistency but do not imply a
specific naming convention.
If LC_MONETARY is not set, the default is the value set for the LANG
environment variable. If LANG is not set, the default value is C.
LC_NUMERIC
Set LC_MONETARY to the language whose currency symbol and format you
want. For example, specify the French currency symbol and format inherent
in the ISO 8859/1 code set, by entering the following command:
setenv LC_MONETARY FR_Fr.88591
Specify the British currency symbol and format, by entering the following
command:
setenv LC_MONETARY EN_Uk.646
The currency symbol can be located in front of, after, or within the numeric
value. For example, in Germany, Switzerland, and France, respectively, the
monetary value 120.50 can be represented as shown in the following list:
120,50DM or DM120,50
Fr120,50 or sFr120.50
120,50FF or 120,50F
LC_NUMERIC
Set the LC_NUMERIC environment variable to specify the default format and
decimal separator for numeric values. The LC_NUMERIC setting takes effect
only at the application level; it has no effect on the database server unless the
value passed to the database server is in a quoted string. In that case, the
conversion is based on the format set in LC_NUMERIC.
setenv
LC_NUMERIC
language
_territory
4-56
.codeset
@modifier
LC_TIME
Valid settings for the .codeset, language, @modifier, and _territory fields might
vary among operating systems. They are not standardized and thus might
not be supported by individual X/Open systems. Example settings in this
section use a particular implementation for consistency but do not imply a
specific naming convention.
The application must convert the numeric data specified in the local format
to the standard ANSI SQL format, where a period is the decimal separator.
For example, set the LC_NUMERIC environment variable to specify German
usage by entering the following command:
setenv LC_NUMERIC DE_De.88591
LC_TIME
Set the LC_TIME environment variable to define the format for the national
date and time. This category includes the country-specific names and
abbreviations for the days of the week and for months.
setenv
LC_TIME
language
_territory
.codeset
@modifier
.codeset
@modifier
LC_TIME
_territory
language
Valid settings for the .codeset, language, @modifier, and _territory fields might
vary among operating systems. They are not standardized and thus might
not be supported by individual X/Open systems. Example settings in this
section use a particular implementation for consistency but do not imply a
specific naming convention.
The LC_TIME setting takes effect at the application level. It also has an effect
on the database server: it affects the DBDATE environment variable setting
for date values (but not DATETIME or INTERVAL formats) that the database
server accepts. The application must convert the date and time specified in
the local format to the standard ANSI SQL format. In addition, the database
server accepts only the string representation of DATETIME and INTERVAL in
the standard ANSI SQL format.
For example, you might set the LC_TIME environment variable to specify
Italian usage by entering the following command:
setenv LC_TIME IT_It.88591
If LC_TIME is not set, the default is the value set for the LANG environment
variable. If LANG is not set, the default value is C.
The contents of a declared DBDATE variable take precedence over the
contents of the LC_TIME variable. However, LC_TIME takes precedence over
the default DBDATE format, except in those instances when the computer
does not support the standard date format, or returns a default format that is
too complicated. If the LC_TIME format (month, day, year, and separator) is
not compatible with or accepted by DBDATE, the default DBDATE format
is used. See the discussion of DBDATE on page 4-21.
4-58
ONCONFIG
ONCONFIG
The ONCONFIG environment variable specifies a file that holds
configuration parameters for INFORMIX-OnLine Dynamic Server. This
file is read as input during the initialization procedure.
filename
setenv
ONCONFIG
filename
Prepare the ONCONFIG file by making a copy of the onconfig.std file and
modifying the copy. Informix recommends that you name the ONCONFIG
file so it can easily be related to a specific OnLine database server. If you have
multiple instances of OnLine, each instance must have its own uniquely
named ONCONFIG file.
If you do not set ONCONFIG, the default filename is onconfig.
For more information, see the INFORMIX-OnLine Dynamic Server
Administrators Guide.
OPTCOMPIND
You can set the OPTCOMPIND environment variable to indicate the preferred
join method, thus assisting the optimizer in selecting the appropriate join
method. The OPTCOMPIND environment variable applies only to the
INFORMIX-OnLine Dynamic Server.
setenv
OPTCOMPIND
0
1
2
PATH
0
1
When the OPTCOMPIND environment variable is not set, OnLine uses the
value specified for the ONCONFIG configuration parameter OPTCOMPIND.
When neither the environment variable nor the configuration parameter is
set, the default value is 0 (zero).
For more information on the ONCONFIG configuration parameter
OPTCOMPIND, see the INFORMIX-OnLine Dynamic Server Administrators
Guide.
PATH
The UNIX PATH environment variable tells the shell which directories to
search for executable programs. You must add the directory that contains
your Informix product to your PATH environment variable before you can
use the product.
:
setenv
pathname
PATH
$PATH:
pathname
You can specify the correct search path in various ways. Be sure to include a
colon between the directory names.
For additional information about how to modify your path, see Modifying
the Setting of an Environment Variable on page 4-9.
4-60
PDQPRIORITY
PDQPRIORITY
The PDQPRIORITY environment variable determines the degree of
parallelism used by the INFORMIX-OnLine Dynamic Server. PDQPRIORITY
affects how OnLine allocates resources, including memory, processors, and
disk reads.
setenv
PDQPRIORITY
HIGH
LOW
OFF
percent-of-resources
HIGH
LOW
OFF
percent-ofresources
PSORT_DBTEMP
Note that although usually the more resources OnLine uses, the better
the performance for a given query; using too many resources can cause
contention among the resources and also take away resources from other
queries, resulting in degraded performance.
Set the PDQPRIORITY environment variable to specify high priority by
entering the following command:
setenv PDQPRIORITY HIGH
When the PDQPRIORITY environment variable is not set, OnLine uses the
value specified for the ONCONFIG configuration parameter PDQPRIORITY.
When neither the environment variable nor the configuration parameter is
set, the default value is OFF.
An application can override the setting of both the environment variable or
the configuration parameter when it issues the SQL statement
SET PDQPRIORITY, which is described in the Informix Guide to SQL: Syntax.
For more information on the ONCONFIG configuration parameter
PDQPRIORITY, see the INFORMIX-OnLine Dynamic Server Administrators
Guide.
PSORT_DBTEMP
The PSORT_DBTEMP environment variable specifies a directory or
directories where the INFORMIX-OnLine Dynamic Server writes the
temporary files it uses when performing a sort.
OnLine uses the directory specified by PSORT_DBTEMP even if the
environment variable PSORT_NPROCS is not set.
:
setenv
pathname
4-62
PSORT_DBTEMP
pathname
PSORT_NPROCS
PSORT_NPROCS
The PSORT_NPROCS environment variable enables the INFORMIX-OnLine
Dynamic Server to improve the performance of the parallel-process sorting
package by allocating more threads for sorting.
setenv
threads
PSORT_NPROCS
threads
SQLEXEC
SQLEXEC
Important: This environment variable functions differently in Version 5.0 and
Version 6.0 and later Informix products. For details of Version 5.0 functionality,
refer to Chapter 4 of the December 1991 release of this manual.
The SQLEXEC environment variable specifies the location of the Version 6.0
or later relay module executable that allows a Version 5.0 or earlier client to
communicate with a local Version 6.0 or later INFORMIX-OnLine Dynamic
Server or INFORMIX-SE database server. You must, therefore, set SQLEXEC
only if you want to establish communication between a Version 5.0 or earlier
client and a Version 6.0 or later database server.
setenv
pathname
SQLEXEC
pathname
Set SQLEXEC to specify the full pathname of the relay module, which is in the
lib subdirectory of your $INFORMIXDIR directory by entering the following
command:
setenv SQLEXEC $INFORMIXDIR/lib/sqlrm
If you set the SQLEXEC environment variable on the C shell command line,
you must include curly braces around the existing INFORMIXDIR, as shown
in the following command:
setenv SQLEXEC ${INFORMIXDIR}/lib/sqlrm
4-64
SQLRM
SQLRM
Important: This environment variable functions differently in Version 5.0 and
Version 6.0 or later Informix products. For details of Version 5.0 functionality, refer
to Chapter 4 of the December 1991 release of this manual.
In Version 6.0 and later, if the system administrator is configuring a client/
server environment in which a Version 5.0 SQL API client accesses a local
Version 6.0 or later database server, the SQLRM environment variable must
be unset before SQLEXEC can be used to spawn a Version 6.0 or later relay
module.
You can unset SQLRM by entering the following command:
unsetenv SQLRM
SQLRMDIR
Important: This environment variable functions differently in Version 5.0 and
Version 6.0 and later Informix products. For details of Version 5.0 functionality,
refer to Chapter 4 of the December 1991 release of this manual.
In Version 6.0 and later, if the database administrator is configuring a client/
server environment in which a Version 5.0 SQL API client accesses a local
Version 6.0 or later database server, the SQLRM environment variable must
be unset.
Unset SQLRMDIR by entering the following command:
unsetenv SQLRMDIR
TERM
TERM
The UNIX TERM environment variable is used for terminal handling. It
enables DB-Access to recognize and communicate with the terminal you are
using.
setenv
type
TERM
type
The terminal type specified in the TERM setting must correspond to an entry
in the termcap file or terminfo directory. Before you can set the TERM environment variable, you must obtain the code for your terminal from the
INFORMIX-OnLine Dynamic Server or INFORMIX-SE administrator.
For example, to specify the vt100 terminal, set the TERM environment
variable by entering the following command:
setenv TERM vt100
TERMCAP
The TERMCAP environment variable is used for terminal handling. It tells
DB-Access to communicate with the termcap file instead of the terminfo
directory.
setenv
pathname
TERMCAP
pathname
The termcap file contains a list of various types of terminals and their characteristics. Set TERMCAP by entering the following command:
setenv TERMCAP /usr/informix/etc/termcap
4-66
TERMINFO
TERMINFO
The TERMINFO environment variable is used for terminal handling. It is
supported only on platforms that provide full support for the terminfo
libraries provided by System V and Solaris UNIX systems.
setenv
TERMINFO
/usr/lib/terminfo
If you set the TERMINFO environment variable, you must also set the
INFORMIXTERM environment variable to terminfo.
Environment Variables
Page
ANSI compliance
DBANSIWARN
4-18
BLOB buffer
DBBLOBBUF
4-20
C compiler
INFORMIXC
4-40
Client/server
INFORMIXSERVER
4-46
INFORMIXSHMBASE
4-47
INFORMIXSTACKSIZE
4-48
SQLEXEC
4-64
SQLRM
4-65
SQLRMDIR
4-65
INFORMIXCOB
4-40
INFORMIXCOBDIR
4-41
INFORMIXCOBSTORE
4-42
INFORMIXCOBTYPE
4-43
COLLCHAR
4-16
LC_COLLATE
4-51
COBOL compiler
Collation (NLS)
(1 of 7)
4-68
Topic
Environment Variables
Page
Compiler
INFORMIXC
4-40
INFORMIXCOB
4-40
INFORMIXCOBDIR
4-41
INFORMIXCOBSTORE
4-42
INFORMIXCOBTYPE
4-43
ARC_DEFAULT
4-15
ARC_KEYPAD
4-15
ONCONFIG
4-59
ENVIGNORE
4-38
Connecting
INFORMIXCONRETRY
4-43
INFORMIXCONTIME
4-44
INFORMIXSERVER
4-46
SQLEXEC
4-64
SQLRM
4-65
SQLRMDIR
4-65
Data distributions
DBUPSPACE
4-37
DBDATE
4-21
DBTIME
4-34
LC_TIME
4-57
Delimited Identifiers
DELIMIDENT
4-38
Disk space
DBUPSPACE
4-37
Editor
DBEDIT
4-23
Executable programs
PATH
4-60
FET_BUF_SIZE
4-39
Database server
(2 of 7)
Environment Variables 4-69
Topic
Environment Variables
Page
DBDELIMITER
4-23
Files: installation
INFORMIXDIR
4-46
Files: mapping
COLLCHAR
4-16
DBAPICODE
4-19
DBLANG
4-24
LANG
4-49
DBSPACETEMP
4-33
DBTEMP
4-34
PSORT_DBTEMP
4-62
INFORMIXTERM
4-49
TERM
4-66
TERMCAP
4-66
TERMINFO
4-67
Installation
INFORMIXDIR
4-46
Language environment
DBLANG
4-24
LANG
4-49
DBLANG
4-24
LANG
4-49
DBMONEY
4-25
LC_MONETARY
4-55
NLS: activating
DBNLS
4-26
LC_CTYPE
4-53
DBAPICODE
4-19
Files: message
Message files
Money values
(3 of 7)
4-70
Topic
Environment Variables
Page
NLS: collation
COLLCHAR
4-16
LC_COLLATE
4-51
LC_TIME
4-57
LC_COLLATE
4-51
LC_CTYPE
4-53
LC_MONETARY
4-55
LC_NUMERIC
4-56
LC_TIME
4-57
LANG
4-49
LC_MONETARY
4-55
Numeric values
LC_NUMERIC
4-56
OnLine: archiving
ARC_DEFAULT
4-15
ARC_KEYPAD
4-15
DBREMOTECMD
4-32
ONCONFIG
4-59
PSORT_DBTEMP
4-62
PSORT_NPROCS
4-63
INFORMIXSHMBASE
4-47
OnLine: stacksize
INFORMIXSTACKSIZE
4-48
ARC_DEFAULT
4-15
ARC_KEYPAD
4-15
DBREMOTECMD
4-32
DBSPACETEMP
4-33
INFORMIXC
4-40
(4 of 7)
Environment Variables 4-71
Topic
Environment Variables
Page
INFORMIXCOBDIR
4-41
DBPATH
4-28
PATH
4-60
INFORMIXDIR
4-46
DBLANG
4-24
PSORT_DBTEMP
4-62
SQLEXEC
4-64
DBREMOTECMD
4-32
DBTEMP
4-34
Printing
DBPRINT
4-31
INFORMIXCOB
4-40
Program: printing
DBPRINT
4-31
Relay module
SQLEXEC
4-64
SQLRM
4-65
SQLRMDIR
4-65
Remote shell
DBREMOTECMD
4-32
DBTIME
4-34
DBTEMP
4-34
Server
Shared memory
INFORMIXSHMBASE
4-47
Shell: remote
DBREMOTECMD
4-32
PATH
4-60
Sorting
PSORT_DBTEMP
4-62
PSORT_NPROCS
4-63
(5 of 7)
Topic
Environment Variables
Page
DBSPACETEMP
4-33
INFORMIXSERVER
4-46
DBEDIT
4-23
DBDELIMITER
4-23
DBUPSPACE
4-37
Stacksize
INFORMIXSTACKSIZE
4-48
DBSPACETEMP
4-33
Temporary files
DBTEMP
4-34
PSORT_DBTEMP
4-62
Temporary tables
DBSPACETEMP
4-33
Terminal handling
INFORMIXTERM
4-49
TERM
4-66
TERMCAP
4-66
TERMINFO
4-67
DBDELIMITER
4-23
DBEDIT
4-23
INFORMIXTERM
4-49
Utilities: dbexport
DBDELIMITER
4-23
Utilities: ON-Archive
ARC_DEFAULT
4-15
ARC_KEYPAD
4-15
DBREMOTECMD
4-32
DBDATE
4-21
DBTIME
4-34
LC_TIME
4-57
Utilities: dbaccess
(6 of 7)
Environment Variables 4-73
Topic
Environment Variables
Page
Values: money
DBMONEY
4-25
LC_MONETARY
4-55
Values: numeric
LC_NUMERIC
4-56
Variables: overriding
ENVIGNORE
4-38
(7 of 7)
4-74
Chapter
SQL Utilities
5
.
5-4
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5-5
5-5
5-7
5-8
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
5-9
5-10
5-12
5-13
5-14
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5-15
5-16
5-17
5-18
5-20
5-21
5-22
5-22
5-23
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5-23
5-25
5-27
5-27
5-28
5-28
5-29
5-30
5-35
5-2
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
5-40
5-42
5-43
5-43
5-44
5-44
5-46
5-47
5-47
5-48
5-49
5-49
5-50
his chapter contains the syntax and usage of the following utilities
which can be used with INFORMIX-OnLine Dynamic Server and
INFORMIX-SE:
The dbexport utility unloads a database into ASCII files for later
import into another database environment.
The dbload utility loads ASCII data into databases or tables created
with Informix products.
Before you use any of these utilities, you must set your PATH, INFORMIXDIR,
and INFORMIXSERVER environment variables.
Tip: If you are using INFORMIX-SE, Informix recommends that you not use the
.dbs directory as your current directory when using a database-related utility. This
keeps the .dbs directory free from file clutter and prevents multiple users from
overwriting files that belong to other users.
For information about system administration utilities, see the
INFORMIX-OnLine Dynamic Server Administrators Guide or the INFORMIX-SE
Administrators Guide.
SQL Utilities
5-3
filename
filename
5-4
input_file
output_file
input_file
output_file
The crtcmap utility reads the text file specified in input_file and produces a
binary output_file of mapped values for a code set. You must put the
output_file in the correct $INFORMIXDIR/msg directory, as specified by the
setting of the LANG or the DBLANG environment variable. See MappingFile Formats on page 5-7 for information on creating an input_file.
SQL Utilities
5-5
The following sample command specifies the fr_FR646.src input_file and the
fr_FR646 output_file:
crtcmap fr_FR646.src fr_FR646
The crtcmap utility names the resulting binary output file mfr_FR646. The
file name indicates the ISO 646 code set for the French language as used in
France.
After you create and correctly place your output files in a message directory,
you can set the DBAPICODE environment variable to specify the name of the
mapping file you want to use to work with SQL or to access a database when
NLS has been enabled in your Version 6.0 Informix product. To specify the
mapping file created in the preceding command example, you set
DBAPICODE as shown in the following example:
setenv DBAPICODE mfr_FR.646
Important: Code sets, valid NLS environment variable settings, and NLS functionality might differ from system to system. You should use any existing standard
naming conventions for your system whenever possible. Examples shown in this
discussion are intended as guidelines but do not imply specific naming or mapping
conventions. Therefore, examples of settings and files might not be supported by
individual systems or hardware.
5-6
A comment line starts with the # symbol and ends with a new-line
character.
The input text file should be written in ASCII or a code set that has the equivalent representation of ASCII for the significant characters and the new-line
character. Significant characters include #, (, ), x, a, b, c, d, e, f, A, B, C, D, E, F,
the comma, and numeric characters.
The following two examples of input files cause errors due to inconsistency
and ambiguity. In the first example, the character represented by 0x21 is
mapped to both target characters 0x12 and 0x13:
# Example input file 1
# (produces an error)
#
(0x20,0x30)
(0x21,0x12)
(0x21,0x13)
...
In the second example, the two characters represented by 0x21 and 0x22 are
mapped to the same target character, 0x12:
# Example input file 2
# (produces a warning)
#
(0x20,0x30)
(0x21,0x12)
(0x22,0x12)
...
SQL Utilities
5-7
The following sample input file shows an example of correct one-to-one mapping. Each character value is mapped to a different target character:
# Example input file 3
# (correctly indicates one-to-one mapping)
#
(0x20,0x30)
(0x21,0x12)
(0x33,0x18)
...
5-8
You must have DBA privilege or log in as user informix to export a database.
When the NLS environment variables are set correctly, as described in
Chapter 4, Environment Variables, dbexport can handle foreign characters
in data and export the data from NLS databases. Refer to Using dbexport
with NLS on page 5-14.
You can use delimited identifiers with the dbexport utility. The utility detects
database objects that are keywords, mixed case, or have special characters
and places double quotes around them.
SQL Utilities
5-9
database
dbexport
-c
OL
-d
-q
Destination
Options p. 5-12
-ss
-X
-V
-c
-d
database
-q
5-10
-ss
-X
-V
In addition to the data files and the schema file, dbexport creates a file of
messages in the current directory called dbexport.out. This file contains any
error messages and warnings as well as a display of the SQL data definition
statements it generates. The same material is also written to the standard output unless you specify the -q option.
During the export, the database is locked in exclusive mode. If an exclusive
lock cannot be obtained, the program ends and displays a diagnostic
message.
You can cancel dbexport at any time by pressing the Interrupt key. The
dbexport utility asks for confirmation before terminating.
SQL Utilities
5-11
-o directory name
-t device -b blocksize -s tapesize
-f pathname
-b blocksize
-f pathname
-o directory name
-s tapesize
-t device
5-12
When you write the data files to tape, you can use the -f option to store the
schema file to disk. You are not required to name the schema file database.sql.
You can give it any name.
The following command creates a reports.exp subdirectory in the current
directory. It then unloads the reports database in the turku directory on the
SE database server called finland and places the resulting files in the
reports.exp directory.
dbexport //finland/turku/reports
The following command exports the OnLine database stores7 to tape with a
block size of 16 kilobytes and a tape capacity of 24,000 kilobytes. The schema
file is written to /tmp/stores7.imp.
dbexport -t /dev/rmt0 -b 16 -s 24000 -f /tmp/stores7.imp
stores7
The following command exports the same stores7 database to the directory
named /work/exports/stores7.exp. The resulting schema file is
/work/exports/stores7.exp/stores7.sql.
dbexport -o /work/exports stores7
Important: Do not put comments into the schema file. Comments cause unpredictable results when read by the dbimport utility.
If you use the -ss option, the schema file contains all the server-specific
information used to create the database and tables, such as initial and next
extent sizes, fragmentation information if the table is fragmented, lock mode,
the dbspace where each table resides, and the blobspace where each blob
column resides. The following information is not retained:
SQL Utilities
5-13
The statements in the schema file that create tables, views, and indexes and
grant privileges do so using the name of the user who originally created the
database. In this way, the original owner retains the DBA privileges for the
database and is the owner of all the tables, indexes, and views. In addition,
whoever executes the dbimport command also has the DBA privileges for the
database.
You can use the SMI database to check the NLS status of all databases
on your server with the following command:
5-14
The schema file is located on disk and the data files are located on
tape.
Important: Do not put comments into your input file. Comments cause
unpredictable results when read by the dbimport utility.
The dbimport utility supports the following options for the new database:
For INFORMIX-OnLine Dynamic Server:
For INFORMIX-SE:
The user who runs dbimport is granted the DBA privilege on the newly
created database. The dbimport process locks each table as it is being loaded
and unlocks the table when the loading is completed.
When the NLS environment variables are set correctly, as described in
Chapter 4, Environment Variables, dbimport can import the data into NLS
databases.
SQL Utilities
5-15
You can use delimited identifiers with the dbimport utility. The utility detects
database objects that are keywords, mixed case, or have special characters
and places double quotes around them.
Input File
Location
p. 5-18
dbimport
Create
Options
p. 5-20
database
-c
-q
-X
-V
-c
database
-q
-X
-V
5-16
Even if you use the -c option, dbimport interrupts processing if one of the
following fatal errors occurs:
Unbuffered logging
Buffered logging
SQL Utilities
5-17
-i directory name
-t device -b blocksize -s tapesize
-f pathname
-b
-f pathname
-i directory name
5-18
-s tapesize
-t device
If you do not specify an input file location, dbimport looks for data files in
the directory database.exp under the current directory and the schema file in
database.exp/database.sql.
The following command imports the stores7 database from a tape with a
block size of 16 kilobytes and a capacity of 24,000 kilobytes. The schema file
is read from /tmp/stores7.imp.
dbimport -c
The following command imports the stores7 database from the stores7.exp
directory under the /work/exports directory. The schema file is assumed to be
/work/exports/stores7.exp/stores7.sql.
dbimport -c -i /usr/informix/port stores7
SQL Utilities
5-19
Create
Options
OL
-d dbspace
-l
buffered
-ansi
SE
-l logfile
-ansi
-ansi
-d dbspace
-l
5-20
-l buffered
-l logfile
SQL Utilities
5-21
2.
3.
2.
3.
Set the LANG environment variable to the desired locale for the NLS
database.
4.
5.
All table columns of the CHAR data type in the non-NLS database are
converted to NCHAR, and VARCHAR columns are converted to NVARCHAR,
in the NLS database. If you want the NCHAR (or NVARCHAR) data type in a
CREATE PROCEDURE statement, however, you must set the COLLCHAR
environment variable when the procedure is executed.
5-22
You can also use dbimport to change the locale of a database. For example,
use dbexport to unload the schema as well as the data from a French database
and set the appropriate NLS environment variables for a German database.
You then use dbimport to create a German database and load the exported
French data.
2.
3.
4.
You can use dbload to load data from input files that have been created with a variety of format arrangements. The dbload command
file can accommodate data from entirely different database management systems.
SQL Utilities
5-23
You can specify a batch size so that after every x number of rows are
inserted, the insert is committed.
You can limit the number of bad rows read, beyond which dbload
ends.
The cost of dbload flexibility is the time and effort spent creating the dbload
command file, which is required for dbload operation. The ASCII input files
are not specified as part of the dbload command line, and neither are the
tables into which the data is inserted. This information is contained within
the command file.
You can load blobs with the dbload utility as long as the blobs are in ASCII
format.
The presence of indexes greatly affects the speed with which the dbload
utility loads data. For best performance, drop any indexes on the tables
receiving the data before you run dbload. You can create new indexes after
dbload has finished.
When the NLS environment variables are set correctly, as described in
Chapter 4, Environment Variables, dbload can load the data into NLS
databases.
You can use delimited identifiers with the dbload utility. The utility detects
database objects that are keywords, mixed case, or have special characters
and places double quotes around them.
The dbload syntax and use information is described in the following
sections. The dbload command file structure and instructions for creating a
command file are found in Creating a dbload Command File on page 5-29.
5-24
dbload
-d database
-c command file
-r
Load Start
Point
p. 5-27
-V
Command-File
Syntax Check
p. 5-27
Batch Size
p. 5-28
Bad-Row
Limits
p. 5-28
-X
-c command file
-d database
SQL Utilities
5-25
-r
-X
-V
Tip: If you specify part (but not all) of the required information, dbload prompts
you for additional specifications. If you are missing all three options, you receive an
error message.
If you are on a network, you can specify a database on another database
server by including the database server name and directory path with the
database name.
The following command loads data into the stores7 database in the turku
directory on the finland database server (finland is an SE database server):
dbload -d //finland/turku/stores7 -c commands -l errlog
5-26
-s
-i number rows
ignore
instructs dbload to ignore the specified number of newline characters. The -i option instructs dbload to read
and ignore the specified number of new-line characters
in the input file before it begins processing. This option
is useful if your most recent dbload session ended prematurely. For example, if dbload ends after inserting
240 lines of input, you can resume loading at line 241 by
setting number rows ignore to 240. It is also useful if
header information in the input file precedes the data
records.
SQL Utilities
5-27
-n number
inserted rows
Bad-Row Limits
Bad-Row
Limits
-e number errors read
-p
5-28
-e number errors
read
-p
Delimiter form
Character-position form
SQL Utilities
5-29
5-30
FILE
c
filename
nfields
filename
DELIMITER
'c'
nfields
defines the field delimiter for the specific input file specified as filename.
specifies the input file.
is an integer indicating the number of fields in each data
row contained in filename.
SQL Utilities
5-31
If the number of columns named is fewer than the number of columns in the
table, dbload inserts the default value specified when the table was created
for the unnamed columns. If no default value is specified, dbload attempts to
insert a null value. If the attempt violates a NOT NULL restriction or a unique
constraint, the insert fails and an error message is returned.
If the INSERT statement omits the column names, the default INSERT
specification is every column in the named table. If the INSERT statement
omits the VALUES clause, the default INSERT specification is every field of the
previous FILE statement.
An error results if the number of column names listed (or implied by default)
does not match the number of values listed (or implied by default).
The syntax of dbload INSERT statements resembles INSERT statements in
SQL, except that in dbload, INSERT statements cannot incorporate SELECT
statements. The following diagram shows the syntax of the dbload INSERT
statement for delimiter form:
INSERT INTO
table name
(
owner.
column name
table name
owner.
,
column
name
INSERT
statement
VALUES
Clause.
See SQL:S.
Users who execute dbload with this command file must have the Insert
privilege on the named table.
5-32
The FILE statement describes the stock.unl data rows as composed of six
fields, each separated by a vertical bar (|) as the delimiter. Compare the FILE
statement with the data row shown in the following example, which appear
in the input file stock.unl. (Because the last field is not followed by a delimiter, an error results if any data row ends with an empty field.)
1|SMT|baseball gloves|450.00|case|10 gloves/case
2|HRO|baseball|126.00|case|24/case
3|SHK|baseball bat|240.00|case|12/case
The example INSERT statement contains only the required elements. Because
the column list is omitted, the INSERT statement implies that values are to be
inserted into every field in the stock table. Because the VALUES clause is
omitted, the INSERT statement implies that the input values for every field
are defined in the most recent FILE statement. This INSERT statement is valid
because the stock table contains six fields, which is the same number of values defined by the FILE statement. The first data row inserted into stock from
this INSERT statement is shown in the following example:
Column
Value
f01
stock_num
f02
manu_code
SMT
f03
description
baseball gloves
f04
unit_price
450.00
f05
unit
case
f06
unit_descr
10 gloves/case
SQL Utilities
5-33
The FILE and INSERT statement shown in the following example set
illustrates a more complex INSERT statement syntax:
FILE stock.unl DELIMITER '|' 6;
INSERT INTO new_stock (col1, col2, col3, col5, col6)
VALUES (f01, f03, f02, f05, 'autographed');
In this example, the VALUES clause uses the field names automatically
assigned by dbload. You must reference the automatically assigned field
names with the letter f followed by a number: f01, f02, f10, f100, f999, f1000,
and so on. All other formats are incorrect.
Tip: The first nine fields must include a zero: f01, f02, ..., f09.
The user changed the column names, the order of the data, and the meaning
of col6 in the new stock table. Because the fourth column in new_stock (col4)
is not named in the column list, the new data row contains a null in the col4
position (assuming that the column permits nulls). If no default is specified
for col4, the inserted value is null.
The first data row inserted into new_stock from this INSERT statement is
shown in the following example:
5-34
Column
Value
col1
col2
baseball gloves
col3
SMT
col4
null
col5
case
col6
autographed
CA94086408-789-8075
CO80219303-936-7731
NY60406312-944-5691
MA02135617-232-4159
AZ85253xxx-xxx-xxxx
The following example of a dbload command file illustrates the characterposition form of the FILE and INSERT statements. The example includes two
new tables, cust_address and cust_sort, to receive the data. For the purpose
of this example, cust_address contains four columns, the second of which is
omitted from the column list. The cust_sort table contains two columns.
FILE cust_loc_data
(city 1-15,
state 16-17,
area_cd 23-25 NULL = 'xxx',
phone 23-34 NULL = 'xxx-xxx-xxxx',
zip 18-22,
state_area 16-17 : 23-25);
INSERT INTO cust_address (col1, col3, col4)
VALUES (city, state, zip);
INSERT INTO cust_sort
VALUES (area_cd, zip);
SQL Utilities
5-35
,
FILE
filename
fieldn
);
:
NULL = 'null string'
start
-end
-end
fieldn
filename
null string
start
5-36
If the number of columns named is fewer than the number of columns in the
table, dbload inserts the default value specified for the unnamed columns. If
no default value is specified, dbload attempts to insert a null value. If the
attempt violates a NOT NULL restriction or a unique constraint, the insert fails
and an error message is returned.
If the INSERT statement omits the column names, the default INSERT
specification is every column in the named table. If the INSERT statement
omits the VALUES clause, the default INSERT specification is every field of the
previous FILE statement.
An error results if the number of column names listed (or implied by default)
does not match the number of values listed (or implied by default).
The syntax of dbload INSERT statements resembles INSERT statements in
SQL, except that in dbload, INSERT statements cannot incorporate SELECT
statements. The following diagram shows the syntax of the dbload INSERT
statement for character-position form:
INSERT INTO
table name
(
owner.
column name
table name
owner.
,
column
name
INSERT
statement
VALUES clause.
See SQL:S.
The syntax for character-position form is identical to the syntax for delimiter
form.
The user who executes dbload with this command file must have the Insert
privilege on the named table. In INFORMIX-SE, the dbload utility recognizes
valid SE table references, including owner designations. That is, the table
name can be preceded by owner name but not by database server name or
database name. Valid table-name syntax is defined in detail in the Informix
Guide to SQL: Syntax.
SQL Utilities
5-37
The FILE statement defines six data fields from the cust_loc_data table data
rows. The statement names the fields and defines the length of each field
using character positions. Compare the FILE statement in the preceding
example with the data rows in the Figure 5-2.
Figure 5-2
A sample data file
1
2
3
1234567890123456789012345678901234
Sunnyvale++++++CA94086408-789-8075
Tempe++++++++++AZ85253xxx-xxx-xxxx
Data row 1
Data row 2
The FILE statement defines the following data fields, which are derived from
the data rows in Figure 5-2.
5-38
Column
city
Sunnyvale++++++
Tempe++++++++++
state
CA
AZ
area_cd
408
null
phone
408-789-8075
null
zip
94086
85253
state_area
CA408
AZxxx
The null strings defined for the phone and area_cd fields generate the null
values in those columns but do not affect the values stored in the state_area
column.
The INSERT statement uses the field names and values derived from the FILE
statement as the value-list input. Consider the following INSERT statement:
INSERT INTO cust_address (col1, col3, col4)
VALUES (city, state, zip);
Using the the FILE statement on page 5-38 and the data shown in Figure 5-2,
the INSERT statement puts the following information into the cust_address
table:
Column
col1
Sunnyvale++++++
Tempe++++++++++
col2
null
null
col3
CA
AZ
col4
94086
85253
Because the second column in cust_address (col2) is not named, the new data
row contains a null (assuming that the column permits nulls).
Consider the following INSERT statement:
INSERT INTO cust_sort
VALUES (area_cd, zip);
SQL Utilities
5-39
This INSERT statement inserts the following data rows into the cust_sort
table:
Column
col1
408
null
col2
94086
85253
Because no column list is provided, dbload reads the names of all the
columns in cust_sort from the system catalog. (You cannot insert data into a
temporary table because temporary tables are not entered into the system
catalog.) Values to load into each column are specified by field names from
the previous FILE statement. You do not need one FILE statement for each
INSERT statement.
5-40
dbschema
Synonyms
p. 5-44
Privileges
p. 5-44
Tables, Views, or
Procedures
p. 5-46
Table Name.
See SQL:S.
-hd
all
-d database
filename
-ss
-V
all
-d database
filename
-hd
directs dbschema to include all the tables in the database in the display of distributions.
specifies the database to which the schema applies. The
database can be on a remote database server. If you
want to use more than the simple name of the database,
refer to the Database Name segment in Chapter 1 of the
Informix Guide to SQL: Syntax.
specifies the filename to contain the dbschema output.
If you do not supply a filename, dbschema sends output
to the screen. If you do supply a filename, dbschema creates a file to contain the dbschema output and gives it
the name you specify.
displays the distribution as data values. See Displaying the Distribution Information for Tables on
page 5-47.
SQL Utilities
5-41
generates server-specific information for a table specified in previous options. This option is ignored if no
table schema is generated. In INFORMIX-SE, the -ss
option generates the pathname where the table was created if the table is not in the database directory. In
INFORMIX-OnLine Dynamic Server, the -ss option
always generates the lock mode, extent sizes, and the
dbspace name if the dbspace name is different from the
database dbspace. In addition, if tables are fragmented,
the -ss option displays information about the fragmentation strategy.
displays product version information.
-ss
-V
You must be the DBA or have the Connect or Resource privilege to the
database before you can run dbschema on it. If you are using INFORMIX-SE,
the database must exist in your current directory or in a directory cited in
your DBPATH environment variable.
When the NLS environment variables are set correctly, as described in
Chapter 4, Environment Variables, dbschema can handle foreign
characters and NLS databases.
You can use delimited identifiers with the dbschema utility. The utility
detects database objects that are keywords, mixed case, or have special
characters and places double quotes around them.
5-42
SQL Utilities
5-43
-s
ownername
all
-s ownername
-s all
Output from dbschema that is executed with the specified option -s alice
might appear, as shown in the following example:
CREATE SYNONYM 'alice'.cust FOR 'alice'.customer
For more information about the CREATE SYNONYM statement, see the
Informix Guide to SQL: Syntax.
-p
user
all
-p user
-p all
You cannot specify a specific list of users with the -p option. You can specify
either one user or all users.
5-44
When the GRANT and AS keywords appear in the dbschema output, you
might need to grant privileges before you run the dbschema output as an
SQL script. Referring to the previous example output line, the following conditions must be true before you can run the statement as part of a script:
norma must have all privileges WITH GRANT OPTION for the table
tom.customer.
For more information about the GRANT statement, see the Informix Guide to
SQL: Syntax.
SQL Utilities
5-45
-t
table name
-f
procedure name
all
view name
all
-f all
-f procedure name
-t table name
-t view name
-t all
For more information about the CREATE PROCEDURE statement, see the
Informix Guide to SQL: Syntax.
5-46
Distribution description
Distribution information
Overflow information
5-47
The output for this discussion can be generated with a call to dbschema that
is similar to the following example:
dbschema -hd invoices -d pubs_stores7
Example Output
DBSCHEMA Schema Utility
INFORMIX-SQL Version 7.1.UC1
Copyright (C) Informix Software, Inc., 1984-1994
{
Distribution for cathl.invoices.invoice_num
Constructed on 03/10/1994
High Mode, 10.000000 Resolution
--- DISTRIBUTION --1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
(
(
(
(
(
(
(
(
(
(
(
16,
16,
16,
16,
16,
16,
16,
16,
16,
10,
7,
6,
8,
8,
7,
8,
12,
12,
11,
5,
5)
11)
17)
25)
38)
52)
73)
95)
139)
182)
200)
5-48
5,
6,
56)
63)
The output is for the invoices table, which is owned by the user cathl. The
particular column being described by this data distribution is invoice_num.
If a table has distributions built on more than one column, dbschema lists the
distributions for each column separately.
The date on which the distributions are constructed is listed. In this example,
it is 03/10/1994, which is the date when the UPDATE STATISTICS statement
that generated the distributions was executed. You can use this date to tell
how outdated your distributions are. Although the system records the date,
it does not record the time.
The last line of the description portion of the output describes the mode
(medium or high) in which the distributions were created, and the resolution.
If you create the distributions with medium mode, the confidence of the sample is also listed. For example, if the UPDATE STATISTICS statement is executed with HIGH mode with a resolution of 10, the last line appears as shown
in the following example:
High Mode, 10.000000 Resolution
(
(
(
(
(
(
(
(
(
(
(
16,
16,
16,
16,
16,
16,
16,
16,
16,
10,
7,
6,
8,
8,
7,
8,
12,
12,
11,
5,
5)
11)
17)
25)
38)
52)
73)
95)
139)
182)
200)
SQL Utilities
5-49
The first value shown in the rightmost column is the smallest value in the
table in this column. In this example, it is 5.
The column on the left shows the bin number, in this case 1 through 10. The
first number in the parenthesis shows how many values are in the bin. For
this table, 10 percent of the total number of rows (165) is, rounded down, 16.
The first number is the same for all the bins except for the last. The last row
might have a smaller value, indicating that it does not have as many row values. In this example, all the bins contain 16 rows except the last one, which
contains 10.
The middle column within the parenthesis indicates how many distinct values are contained in this bin. Thus, if there are 11 distinct values for a 16-value
bin, it implies that 1 or more of those values are duplicated at least once.
The right column within the parenthesis is the highest value in the bin. The
highest value in the last bin is also the highest value in the table. For this
example, the highest value in the last bin is 200.
5,
6,
56)
63)
For this example, the critical amount is 0.25 0.10 165, or 4.125. Therefore,
any value that is duplicated five or more times is listed in the overflow
section. Two values in this distribution are duplicated five or more times in
the table: The value 56 is duplicated five times and the value 63 is duplicated
six times.
5-50
Appendix
The first section describes the structure of the tables in the stores7
database. It identifies the primary key of each table, lists the name
and data type of each column, and indicates whether the column
has a default value or check constraint. Indexes on columns are
also identified and classified as unique or if they allow duplicate
values.
The final section shows the data contained in each table of the
stores7 database.
customer
orders
items
stock
catalog
cust_calls
call_type
manufact
state
The following sections describe each table. The unique identifier for each
table (primary key) is shaded and indicated by a key symbol.
A-2
The zipcode column in Figure A-1 is indexed and allows duplicate values.
Figure A-1
The customer table
Column
Name
customer_num
fname
lname
company
address1
address2
city
state
zipcode
phone
Data
Type
SERIAL(101)
CHAR(15)
CHAR(15)
CHAR(20)
CHAR(20)
CHAR(20)
CHAR(15)
CHAR(18)
CHAR(2)
CHAR(5)
Description
system-generated customer number
first name of store representative
last name of store representative
name of store
first line of store address
second line of store address
city
state (foreign key to state table
zipcode
telephone number
Data
Type
ship_instruct
backlog
CHAR(40)
CHAR(1)
po_num
ship_date
ship_weight
ship_charge
paid_date
CHAR(10)
DATE
DECIMAL(8,2)
MONEY(6)
DATE
SERIAL(1001)
DATE
INTEGER
Description
system-generated order number
date order entered
customer number (foreign key to customer
table)
special shipping instructions
indicates order cannot be filled because the item
is backlogged:
y = yes
n = no
customer purchase order number
shipping date
shipping weight
shipping charge
date order paid
A-3
Data
Type
quantity
total_price
SMALLINT
MONEY(8)
SMALLINT
INTEGER
SMALLINT
CHAR(3)
Description
sequentially assigned item number for an order
order number (foreign key to orders table)
stock number for item (foreign key to stock table)
manufacturer code for item ordered (foreign key
to manufact table)
quantity ordered (value must be > 1)
quantity ordered unit price = total price of item
A-4
The stock table is a catalog of the items sold by the distributor. The columns
of the stock table are shown in Figure A-4.
Figure A-4
The stock table
Column
Name
stock_num
manu_code
Data
Type
description
unit_price
unit
CHAR(15)
MONEY(6,2)
CHAR(4)
unit_descr
CHAR(15)
SMALLINT
CHAR(3)
Description
stock number that identifies type of item
manufacturer code (foreign key to manufact
table)
description of item
unit price
unit by which item is ordered:
each
pair
case
box
description of unit
Data
Type
manu_code
CHAR(3)
cat_descr
cat_picture
cat_advert
TEXT
BYTE
VARCHAR(255, 65)
SERIAL(10001)
SMALLINT
Description
system-generated catalog number
distributor stock number (foreign key to
stock table)
manufacturer code (foreign key to
manufact table)
description of item
picture of item (binary data)
tag line underneath picture
The catalog table appears only if you are using an OnLine database server.
A-5
Data
Type
Description
INTEGER
customer number (foreign
key to customer table)
DATETIME YEAR TO MINUTE date and time call received
CHAR(18)
name of person logging call
(default is user login name)
CHAR(1)
type of call (foreign key to
call_type table)
CHAR(240)
description of call
DATETIME YEAR TO MINUTE date and time call resolved
CHAR(240)
description of how call was
resolved
Figure A-6
The cust_calls table
A-6
Data
Type
CHAR(1)
CHAR (30)
Description
call code
description of call type
Figure A-7
The call_type table
Data
Type
CHAR(3)
CHAR(15)
INTERVAL DAY(3) TO DAY
Description
manufacturer code
name of manufacturer
lead time for shipment
of orders
Figure A-8
The manufact table
Data
Type
CHAR(2)
CHAR(15)
Description
state code
state name
Figure A-9
The state table
A-7
A-8
lname
address1
address2
city
state
zipcode
phone
user_id
call_code
call_descr
res_dtime
res_descr
state
code
sname
call_type
call_code
call_descr
company
fname
call_dtime
ship_weight
ship_date
po_num
backlog
ship_instruct
customer_num
customer_num
customer_num
total_price
quantity
manu_code
stock_num
order_date
customer
order_num
order_num
cust_calls
item_num
orders
items
unit_descr
unit
unit_price
description
manu_code
stock_num
stock
cat_advert
cat_picture
cat_descr
manu_code
stock_num
catalog_num
catalog
lead_time
manu_name
manu_code
manufact
Figure A-10
Joins in the stores7 database
fname
lname
Ludwig
Carole
Philip
Anthony
Pauli
Sadler
Currie
Higgins
Figure A-11
Tables joined by the
customer_num
column
order_date
05/20/1994
05/21/1994
05/22/1994
05/22/1994
customer_num
104
101
104
106
A-9
According to Figure A-11, customer 104 (Anthony Higgins) has placed two
orders, as his customer number appears in two rows of the orders table.
Because the customer number is a foreign key in the orders table, you can
retrieve Anthony Higgins name, address, and information about his orders
at the same time.
order_date
1001
1002
1003
customer_num
05/20/1994
05/21/1994
05/22/1994
104
101
104
A-10
item_num
order_num
stock_num
manu_code
1
1
2
1
2
3
1001
1002
1002
1003
1003
1003
1
4
3
9
8
5
HRO
HSK
HSK
ANZ
ANZ
ANZ
Figure A-12
Tables joined by the
order_num column
order_num
stock_num
manu_code
1
1
2
1
2
3
1
1001
1002
1002
1003
1003
1003
1004
1
4
3
9
8
5
1
HRO
HSK
HSK
ANZ
ANZ
ANZ
HRO
Figure A-13
Tables joined by the
stock_num and
manu_code
columns
manu_code
1
1
1
HRO
HSK
SMT
description
baseball gloves
baseball gloves
baseball gloves
A-11
manu_code
1
1
1
HRO
HSK
SMT
description
baseball gloves
baseball gloves
baseball gloves
A-12
catalog_num
stock_num
manu_code
10001
10002
10003
10004
1
1
1
2
HRO
HSK
SMT
HRO
Figure A-14
Tables joined by the
stock_num and
manu_code
columns
manu_code
1
1
1
HRO
HSK
SMT
description
Figure A-15
Tables joined by the
manu_code column
baseball gloves
baseball gloves
baseball gloves
manu_name
NRG
HSK
HRO
Norge
Husky
Hero
A-13
fname
lname
Ludwig
Carole
Philip
Anthony
Raymond
George
Pauli
Sadler
Currie
Higgins
Vector
Watson
A-14
call_dtime
user_id
1994-06-12 08:20
1994-07-31 14:30
1993-11-28 13:34
1993-12-21 11:24
maryj
maryj
mannyh
mannyh
Figure A-16
Tables joined by the
customer_num
column
code_descr
billing error
damaged goods
incorrect merchandise sent
late shipment
other
call_dtime
1994-06-12 08:20
1994-07-31 14:30
1993-11-28 13:34
1993-12-21 11:24
call_code
D
I
I
I
A-15
fname
lname
---
state
Ludwig
Carole
Philip
Pauli
Sadler
Currie
-------
CA
CA
CA
Figure A-18
Tables joined by the
state/code column
sname
AK
AL
AR
AZ
CA
Alaska
Alabama
Arkansas
Arizona
California
A-16
Pauli
Ludwig
Carole
Philip
Anthony
Raymond Vector
George
Charles
Donald
Jane
Roy
101
102
103
104
105
106
107
108
109
110
Margaret Lawson
Lana
Frank
112
113
114
address1
Sportstown
Sports Center
AA Athletics
Sport Stuff
Quinns Sports
Athletic Supplies
Play Ball!
Phils Sports
Sports Spot
P. O. Box
3498
address2
CA
Palo Alto
CA
Mayfair Mart
587 Alvarado
41 Jordan Avenue
7345 Ross
Blvd.
CA
CA
CA
CA
CA
CA
CA
Redwood City CA
Menlo Park
Los Altos
Sunnyvale
Redwood City CA
Sunnyvale
Redwood City CA
Palo Alto
Mountain
View
Los Altos
94062
94025
94022
94085
94062
94086
94063
94304
94063
94022
94026
94303
94117
94086
(1 of 3)
415-886-6677
415-356-9982
415-887-7235
408-277-7245
415-743-3611
408-723-8789
415-544-8729
415-356-9876
415-389-8789
415-776-3249
415-368-1100
415-328-4543
415-822-1289
408-789-8075
San Francisco CA
Sunnyvale
city
654 Poplar
785 Geary St
company
Beatty
Frances
111
Keyes
Jaeger
Miller
Quinn
Ream
Watson
Higgins
Currie
Sadler
lname
customer_num fname
customer Table
A-17
A-18
Grant
Alfred
Jean
Arnold
Dick
Bob
Fred
Jason
Cathy
Marvin
Chris
James
Eileen
115
116
117
118
119
120
121
122
123
124
125
126
company
Henry
Putnum
Hanlon
OBrian
Wallack
Jewell
Shorter
Baxter
Sipes
address1
Neelies Discount
Sports
address2
Suite 909C
Putnums Putters
Bay Sports
City Sports
Kids Korner
lname
customer_num fname
CA
CA
Denver
Brighton
Bartlesville
Jacksonville
Princeton
Wilmington
Phoenix
Cherry Hill
Oakland
CO
MA
OK
FL
NJ
DE
AZ
NJ
CA
80219
02135
74006
32256
08540
19898
85016
08002
94609
94063
94040
94025
(2 of 3)
303-936-7731
617-232-4159
918-355-2074
904-823-4239
609-342-0054
302-366-7511
602-265-8754
609-663-6079
415-655-0011
415-245-4578
415-534-8822
415-356-1123
Redwood City CA
Mountain
View
Menlo Park
city
Satifer
Kim
Frank
127
128
Lessor
lname
customer_num fname
Blue Island Square
address1
company
city
address2
AZ
NY
85008
60406
(3 of 3)
602-533-1817
312-944-5691
A-19
order_num
stock_num
manu_code
quantity
total_price
1001
HRO
250.00
1002
HSK
960.00
1002
HSK
240.00
1003
ANZ
20.00
1003
ANZ
840.00
1003
ANZ
99.00
1004
HRO
250.00
1004
HRO
126.00
1004
HSK
240.00
1004
HSK
800.00
1005
NRG
10
280.00
1005
ANZ
10
198.00
1005
SMT
36.00
1005
ANZ
48.00
1006
SMT
125.00
1006
NRG
140.00
1006
ANZ
99.00
1006
SMT
36.00
1006
ANZ
48.00
1007
HRO
250.00
1007
HRO
126.00
1007
HSK
240.00
1007
HRO
480.00
(1 of 3)
A-20
item_num
order_num
stock_num
manu_code
quantity
total_price
1007
HRO
600.00
1008
ANZ
840.00
1008
ANZ
100.00
1009
SMT
450.00
1010
SMT
36.00
1010
ANZ
48.00
1011
ANZ
99.00
1012
ANZ
840.00
1012
ANZ
10
200.00
1013
ANZ
19.80
1013
SMT
36.00
1013
ANZ
48.00
1013
ANZ
40.00
1014
HSK
960.00
1014
HRO
480.00
1015
SMT
450.00
1016
101
SHM
136.00
1016
109
PRC
90.00
1016
110
HSK
308.00
1016
114
PRC
120.00
1017
201
NKL
150.00
1017
202
KAR
230.00
1017
301
SHM
204.00
1018
307
PRC
500.00
(2 of 3)
The stores7 Database
A-21
item_num
order_num
stock_num
manu_code
quantity
total_price
1018
302
KAR
15.00
1018
110
PRC
236.00
1018
SMT
100.00
1018
304
HRO
280.00
1019
111
SHM
1499.97
1020
204
KAR
90.00
1020
301
KAR
348.00
1021
201
NKL
75.00
1021
201
ANZ
225.00
1021
202
KAR
690.00
1021
205
ANZ
624.00
1022
309
HRO
40.00
1022
303
PRC
96.00
1022
ANZ
96.00
1023
103
PRC
40.00
1023
104
PRC
116.00
1023
105
SHM
80.00
1023
110
SHM
228.00
1023
304
ANZ
170.00
1023
306
SHM
190.00
(3 of 3)
A-22
call_type Table
call_code
code_descr
billing error
damaged goods
late shipment
other
A-23
A-24
05/21/1994
05/22/1994
05/22/1994
05/24/1994
05/30/1994
05/31/1994
06/07/1994
06/14/1994
06/17/1994
06/18/1994
06/18/1994
06/22/1994
06/25/1994
06/27/1994
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
110
106
104
117
104
115
111
110
117
112
116
106
104
101
104
05/20/1994
1001
closed Mondays
express
express
door next to
grocery
closed Monday
after 10AM
express
ship_date
05/26/1994 50.60
06/29/1994 40.60
06/21/1994 20.40
07/06/1994 45.60
06/05/1994 125.90
70.80
06/09/1994 80.80
05/30/1994 95.80
06/29/1994 70.80
07/03/1994 40.60
MA003 07/16/1994 20.60
8052
278701
429Q
4745
LZ230
278693
Q13557
2865
8006
9270
6.30
12.30
12.20
14.20
5.00
12.30
10.00
13.80
25.20
14.20
16.20
19.20
10.80
15.30
10.00
(1 of 2)
08/31/1994
07/10/1994
07/31/1994
08/29/1994
08/22/1994
08/21/1994
07/21/1994
06/21/1994
06/14/1994
06/03/1994
07/22/1994
backlog po_num
PO on box; deliver n
back door only
express
customer_num ship_instruct
order_num order_date
orders Table
07/09/1994
07/10/1994
07/11/1994
07/11/1994
07/23/1994
07/24/1994
07/24/1994
1017
1018
1019
1020
1021
1022
1023
127
126
124
123
122
121
120
119
06/29/1994
1016
no deliveries after
3 p.m.
express
express
ship_date
07/13/1994 70.50
07/30/1994 15.00
07/25/1994 40.00
07/16/1994 14.00
W9925
C3288
W2286
S22942
18.00
13.00
12.00
8.50
23.00
20.00
18.00
11.80
(2 of 2)
08/22/1994
09/02/1994
08/22/1994
09/20/1994
08/06/1994
08/06/1994
backlog po_num
delivery entrance
off Camp St.
customer_num ship_instruct
order_num order_date
A-25
manu_code
description
unit_price
unit
unit_descr
HRO
baseball gloves
250.00
case
10 gloves/case
HSK
baseball gloves
800.00
case
10 gloves/case
SMT
baseball gloves
450.00
case
10 gloves/case
HRO
baseball
126.00
case
24/case
HSK
baseball bat
240.00
case
12/case
SHM
baseball bat
280.00
case
12/case
HSK
football
960.00
case
24/case
HRO
football
480.00
case
24/case
NRG
tennis racquet
28.00
each
each
SMT
tennis racquet
25.00
each
each
ANZ
tennis racquet
19.80
each
each
SMT
tennis ball
36.00
case
24 cans/case
ANZ
tennis ball
48.00
case
24 cans/case
HRO
basketball
600.00
case
24/case
ANZ
volleyball
840.00
case
24/case
ANZ
volleyball net
20.00
each
each
101
PRC
bicycle tires
88.00
box
4/box
101
SHM
bicycle tires
68.00
box
4/box
102
SHM
bicycle brakes
220.00
case
4 sets/case
102
PRC
bicycle brakes
480.00
case
4 sets/case
103
PRC
front derailleur
20.00
each
each
104
PRC
rear derailleur
58.00
each
each
105
PRC
bicycle wheels
53.00
pair
pair
(1 of 4)
A-26
stock_num
manu_code
description
unit_price
unit
unit_descr
105
SHM
bicycle wheels
80.00
pair
pair
106
PRC
bicycle stem
23.00
each
each
107
PRC
bicycle saddle
70.00
pair
pair
108
SHM
crankset
45.00
each
each
109
PRC
pedal binding
30.00
case
6 pairs/case
109
SHM
pedal binding
200.00
case
4 pairs/case
110
PRC
helmet
236.00
case
4/case
110
ANZ
helmet
244.00
case
4/case
110
SHM
helmet
228.00
case
4/case
110
HRO
helmet
260.00
case
4/case
110
HSK
helmet
308.00
case
4/case
111
SHM
each
each
112
SHM
each
each
113
SHM
each
each
114
PRC
bicycle gloves
120.00
case
10 pairs/case
201
NKL
golf shoes
37.50
each
each
201
ANZ
golf shoes
75.00
each
each
201
KAR
golf shoes
90.00
each
each
202
NKL
metal woods
174.00
case
2 sets/case
202
KAR
std woods
230.00
case
2 sets/case
203
NKL
irons/wedges
670.00
case
2 sets/case
204
KAR
putter
45.00
each
each
205
NKL
3 golf balls
312.00
case
24/case
205
ANZ
3 golf balls
312.00
case
24/case
(2 of 4)
The stores7 Database
A-27
stock_num
manu_code
description
unit_price
unit
unit_descr
205
HRO
3 golf balls
312.00
case
24/case
301
NKL
running shoes
97.00
each
each
301
HRO
running shoes
42.50
each
each
301
SHM
running shoes
102.00
each
each
301
PRC
running shoes
75.00
each
each
301
KAR
running shoes
87.00
each
each
301
ANZ
running shoes
95.00
each
each
302
HRO
ice pack
4.50
each
each
302
KAR
ice pack
5.00
each
each
303
PRC
socks
48.00
box
24 pairs/box
303
KAR
socks
36.00
box
24 pair/box
304
ANZ
watch
170.00
box
10/box
304
HRO
watch
280.00
box
10/box
305
HRO
first-aid kit
48.00
case
4/case
306
PRC
tandem adapter
160.00
each
each
306
SHM
tandem adapter
190.00
each
each
307
PRC
infant jogger
250.00
each
each
308
PRC
twin jogger
280.00
each
each
309
HRO
ear drops
40.00
case
20/case
309
SHM
ear drops
40.00
case
20/case
310
SHM
kick board
80.00
case
10/case
310
ANZ
kick board
89.00
case
12/case
311
SHM
water gloves
48.00
box
4 pairs/box
312
SHM
racer goggles
96.00
box
12/box
(3 of 4)
A-28
stock_num
manu_code
description
unit_price
unit
unit_descr
312
HRO
racer goggles
72.00
box
12/box
313
SHM
swim cap
72.00
box
12/box
313
ANZ
swim cap
60.00
box
12/box
(4 of 4)
A-29
A-30
1
2
3
3
4
4
10002
10003
10004
10005
10006
10007
10008
HRO
HSK
SHM
HSK
HRO
SMT
HSK
HRO
10001
NFL-Style pigskin.
manu_code cat_descr
catalog_num stock_num
catalog Table
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
(1 of 12)
All-Leather, Hand-Stitched,
Deep-Pockets, Sturdy Webbing
that Wont Let Go
cat_advert
6
6
7
8
10012
10013
10014
10015
9
10011
10016
10010
ANZ
ANZ
HRO
ANZ
SMT
ANZ
SMT
NRG
10009
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
manu_code cat_descr
catalog_num stock_num
(2 of 12)
cat_advert
A-31
A-32
102
102
103
104
10018
10019
10020
10021
10022
PRC
PRC
PRC
SHM
SHM
PRC
101
10017
<BYTE value>
<BYTE value>
cat_picture
<BYTE value>
<BYTE value>
Computer-aided design with lowprofile pads. Cold-forged alloy calipers and beefy caliper bushing. Aero
levers. Set includes calipers, levers,
and cables.
manu_code cat_descr
catalog_num stock_num
(3 of 12)
cat_advert
107
108
10026
10027
109
106
10025
10028
105
10024
PRC
SHM
PRC
PRC
SHM
PRC
105
10023
<BYTE value>
cat_picture
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
manu_code cat_descr
catalog_num stock_num
(4 of 12)
cat_advert
A-33
A-34
110
110
110
10030
10031
10032
10033
HRO
SHM
ANZ
PRC
SHM
109
10029
manu_code cat_descr
catalog_num stock_num
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
(5 of 12)
Feather-Light, Quick-Release,
Maximum Protection Helmet
cat_advert
113
10037
114
112
10036
10038
111
10035
PRC
SHM
SHM
SHM
HSK
110
10034
cat_picture
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
manu_code cat_descr
catalog_num stock_num
(6 of 12)
cat_advert
A-35
A-36
201
202
202
203
204
205
10040
10041
10042
10043
10044
10045
10046
NKL
KAR
NKL
KAR
NKL
KAR
ANZ
NKL
201
10039
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
Fluorescent yellow.
<BYTE value>
<BYTE value>
<BYTE value>
manu_code cat_descr
catalog_num stock_num
(7 of 12)
cat_advert
301
301
10050
10051
301
301
10049
10052
205
10048
PRC
SHM
HRO
NKL
HRO
ANZ
205
10047
White only.
manu_code cat_descr
catalog_num stock_num
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
(8 of 12)
cat_advert
A-37
A-38
302
303
303
10054
10055
10056
10057
KAR
PRC
KAR
ANZ
KAR
301
10053
Cantilever sole provides shock absorption and energy rebound. Positive traction shoe with ample toe box.
Ideal for runners who need a wide
shoe. Available in mens and womens. Specify size.
manu_code cat_descr
catalog_num stock_num
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
(9 of 12)
cat_advert
308
306
10062
10064
306
10061
307
305
10060
10063
304
10059
PRC
PRC
SHM
PRC
HRO
HRO
ANZ
304
10058
Split timer, waterproof to 50m. Indicate color: Hot pink, mint green,
space black.
manu_code cat_descr
catalog_num stock_num
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
(10 of 12)
cat_advert
A-39
A-40
309
310
310
311
312
312
313
314
10066
10067
10068
10069
10070
10071
10072
10073
ANZ
SHM
HRO
SHM
SHM
ANZ
SHM
SHM
HRO
309
10065
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
cat_picture
Silicone swim cap. One size. Available in white, silver, or navy. Team
Logo Imprinting Available.
<BYTE value>
<BYTE value>
<BYTE value>
<BYTE value>
manu_code cat_descr
catalog_num stock_num
(11 of 12)
High-Quality Kickboard
cat_advert
HRO
10074
315
manu_code cat_descr
catalog_num stock_num
<BYTE value>
cat_picture
(12 of 12)
cat_advert
A-41
A-42
1994-07-10 14:05
1994-07-31 14:30
119
121
127
maryj
maryj
richc
richc
1994-07-07 10:24
110
res_dtime
maryj
1994-06-12 8:20
106
customer_num call_dtime
cust_calls Table
(1 of 2)
Spoke with Jane Akant in Finance. She found the error and is
sending new bill to customer.
res_descr
mannyn
1993-12-21 11:24
116
res_dtime
mannyn
1993-11-28 13:34
116
customer_num call_dtime
(2 of 2)
res_descr
A-43
manu_name
lead_time
ANZ
Anza
HSK
Husky
HRO
Hero
NRG
Norge
SMT
Smith
SHM
Shimara
30
KAR
Karsten
21
NKL
Nikolus
PRC
ProCycle
state Table
code
sname
code
sname
AK
Alaska
MT
Montana
AL
Alabama
NE
Nebraska
AR
Arkansas
NC
North Carolina
AZ
Arizona
ND
North Dakota
CA
California
NH
New Hampshire
CT
Connecticut
NJ
New Jersey
CO
Colorado
NM
New Mexico
DC
D.C.
NV
Nevada
DE
Delaware
NY
New York
FL
Florida
OH
Ohio
(1 of 2)
A-44
code
sname
code
sname
GA
Georgia
OK
Oklahoma
HI
Hawaii
OR
Oregon
IA
Iowa
PA
Pennsylvania
ID
Idaho
PR
Puerto Rico
IL
Illinois
RI
Rhode Island
IN
Indiana
SC
South Carolina
KY
Kentucky
TN
Tennessee
LA
Louisiana
TX
Texas
MA
Massachusetts
UT
Utah
MD
Maryland
VA
Virginia
ME
Maine
VT
Vermont
MI
Michigan
WA
Washington
MN
Minnesota
WI
Wisconsin
MO
Missouri
WV
West Virginia
MS
Mississippi
WY
Wyoming
(2 of 2)
A-45
Glossary
Glossary
access method
access
privileges
active set
aggregate
functions
alias
ANSI
ANSIcompliant
Refers to a database that conforms to certain ANSI performance standards. Informix databases can be created
either as ANSI-compliant or not ANSI-compliant. An
ANSI-compliant database enforces certain ANSI requirements, such as implicit transactions, required ownernaming, and unbuffered logging (unbuffered logging
only when using INFORMIX-OnLine Dynamic Server), that
are not enforced in databases that are not
ANSI-compliant.
application
development
tool
Software, such as INFORMIX-4GL, that you can use to create and maintain a database. The software allows a user to
send instructions and data to and receive information
from the database server.
application
process
application
program
arbitrary rule
archiving
argument
array
attached index
audit event
audit file
Glossary
audit mask
audit trail
auxiliary
statements
B+ tree
backup
before-image
blobpage
blobs
blobspace
buffer
buffered
logging
byte
callback
function
Cartesian
product
The set that results when you pair each and every
member of one set with each and every member of
another set. A Cartesian product results from a
multiple-table query when you do not specify the joining
conditions among tables. See join.
Glossary
cascading
deletes
casesensitivity
character
check
constraint
checkpoint
child table
chunk
client
client/server
architecture
client/server
connection
statements
client/server
processing
close a cursor
close a
database
close a file
cluster an
index
cluster key
clustersize
code set
Glossary
collating
sequence
column
command file
comment
COMMIT
WORK
COMMITTED
READ
compile
compile-time
errors
The errors that occur at the time the program source code
is converted to executable form. Compare with run-time
errors.
composite
index
composite join
concatenate
concatenation
operator
concurrency
configuration
file
connection
constant
Glossary
constraint
control
character
correlation
name
corrupted
database
corrupted
index
current row
10
cursor
cursor
manipulation
statements
CURSOR
STABILITY
data access
statements
data definition
statements
The SQL statements that you use to create, alter, drop, and
rename data objects, including databases, tables, views,
synonyms, triggers, and procedures.
data dictionary
11
data integrity
data integrity
statements
data
manipulation
statements
data
replication
data restriction
data type
database
Database
Administrator
12
See DBA.
database
application
database
environment
database
management
system
See DBMS.
database
server process
DBA
DBAprivileged
DBMS
Glossary
13
dbspace
DDL
deadlock
debug file
decisionsupport
application
decisionsupport query
declaration
statement
14
default
default value
delete
delimited
identifier
delimiter
descriptor
detached index
diagnostic area
Glossary
15
DIRTY READ
disk
configuration
disk I/O
display label
distributed
data
distribution
scheme
DML
dominant
table
16
dynamic
management
statements
dynamic SQL
dynamic
statements
embedded
SQL
environment
variable
error message
error trapping
escape
character
Glossary
17
escape key
exception
exclusive
access
exclusive lock
executable file
execute
explicit
connection
exponent
expression
18
expressionbased
distribution
scheme
extent
external table
family name
fast recovery
fault tolerance
fetch
fetch buffer
field
Glossary
19
file
file server
fixchar
fixed-point
number
20
filename
extension
flag
floating-point
number
forced
residency
foreign key
fragment
fragment
expression
fragmentation
fragmentation
strategy
function
gateway
global variable
Glossary
21
hash rule
hierarchy
high
availability
highlight
22
hold cursor
home page
The page that contains the first byte of the data row. Even
if a data row outgrows its original storage location, the
home page does not change. The home page contains a
forward pointer to the new location of the data row. See
remainder page.
host variable
identifier
implicit
connection
incremental
archiving
index
index
fragment
Informix user
ID
Glossary
23
Informix user
password
initialize
inmigration
input
input
parameter
insert cursor
24
installation
interactive
interquery
parallelization
interrupt
interrupt key
intraquery
parallelization
IPX/SPX
ISAM
ISAM error
Glossary
25
ISO
26
isolation
join
jukebox
kernel
key
keyword
language
supplement
latch
level of
isolation
library
See isolation.
Glossary
27
link
literal
28
local character
local loopback
local variable
locale
lock mode
locking
locking
granularity
logical log
login
login
password
login user ID
macro
Memory
Grant
Manager
(MGM)
Glossary
29
mantissa
math functions
menu
message log
mirroring
MODE ANSI
The keywords specified on the CREATE DATABASE statement to make a database ANSI-compliant.
multithreading
30
national
character
native
character
native
language
NLS
null value
offset
OLTP
application
OLTP queries
OnLine
instance
ON-Monitor
open
Glossary
31
operating
mode
optical cluster
optical family
optical platters
optical
statements
optical volume
outer join
outmigration
output
32
ownerprivileged
pad
page
parallelism
parameter
parent-child
relationship
parent table
partition
pattern
Glossary
33
PDQ
PDQ priority
permission
phantom row
physical log
34
pointer
precision
prepared
statement
preprocessor
primary key
primary-key
constraint
printable
character
privilege
procedural
statement
procedure
procedure
cursor
Glossary
35
process
program block
program
control
projection
promotable
lock
protocol
query
query
optimization
information
statements
36
range rule
raw device
A UNIX disk partition that is defined as a characterspecial device, which is not mounted. It can be used for
INFORMIX-OnLine Dynamic Server disk space to increase
performance with UNIX files.
READ
COMMITTED
Glossary
37
referential
constraint
relation
See table.
relational
database
remainder
page
remote
REPEATABLE
READ
reserved word
restore a
database
38
roll back
roll forward
root dbspace
round-robin
distribution
scheme
An OnLine-defined distribution scheme. Online distributes rows in such a way that the number of rows in each
of the fragments remains approximately the same.
routine
row
Glossary
39
rowid
rule
run-time
environment
run-time errors
scale
scan thread
schema
40
scope of
reference
scroll cursor
secure
auditing
select
select cursor
selection
self-join
semaphore
Glossary
41
SERIALIZABLE
server name
server number
session
set functions
shared lock
42
shared
memory
shelf
The location of an optical platter that is neither on an optical drive nor in a jukebox slot.
shuffling
signal
singleton
select
SMI
source file
SPL
Glossary
43
44
SQL
SQL API
SQLCA
sqlda
Acronym for SQL descriptor area. A dynamic SQL management structure that can be used with the DESCRIBE
statement to store information about database columns or
host variables used in dynamic SQL statements. The structure contains an sqlvar_struct structure for each column;
each sqlvar_struct structure provides information such as
the name, data type, and length of the column. The sqlda
structure is an Informix-specific structure for handling
dynamic columns. It is available only within an
INFORMIX-ESQL/C program. See also descriptor, and
system-descriptor area.
sqlexecd
staging-area
blobspace
statement
statement
block
statement
identifier
status variable
stored
procedure
Glossary
45
string
subordinate
table
46
subquery
A query that is embedded as part of another SQL statement. For example, an INSERT statement can contain a
subquery in which a SELECT statement supplies the
inserted values in place of a VALUES clause; an UPDATE
statement can contain a subquery in which a SELECT
statement supplies the updating values; or a SELECT
statement can contain a subquery in which a second
SELECT statement supplies the qualifying conditions of a
WHERE clause for the first SELECT statement. (Parentheses always delimit a subquery, unless you are referring to
a CREATE VIEW statement or unions.)
subscript
substring
synonym
sysmaster
database
system call
system catalog
systemdescriptor area
system
monitoring
interface
table
See SMI.
Glossary
47
table fragment
tblspace
TCP/IP
temporary
thread
timeout
TLI
trace
48
transaction
transaction
logging
trigger
tuple
unique
constraint
unique key
UNIX real
user ID
See row.
Specifies that each entry in a column or set of columns has
a unique value.
See primary key.
See Informix user ID.
unlock
update
Glossary
49
update lock
user ID
user ID
password
user name
user password
variable
view
virtual column
50
virtual
processors
warning
wildcard
window
WORM
X/Open
Glossary
51
X/Open
Portability
Guide
52
Index
Multiple-Volume Index
A
ABS function
syntax in expression 1-560S
use in expression 1-563S
ABSOLUTE keyword
syntax in FETCH 1-260S
use in FETCH 1-264S
Access control. See Privilege.
ACCESS FOR keywords, in INFO
statement 1-317S
Access modes
discussed 7-16T
Accessing data in a fragmented
table 9-39T
Accessing tables 11-18T
ACOS function
syntax in expression 1-577S
use in expression 1-579S
Action clause
AFTER 1-172S
definition of 1-171S
Aggregate function
ALL keyword, syntax 1-583S
and GROUP BY clause 3-5T
AVG function, syntax 1-583S
description of 2-53T
DISTINCT keyword, syntax
1-583S
in ESQL 5-15T, 1-588S
in EXISTS subquery 1-529S
in expressions 1-400S
in SELECT 1-401S
in SPL expressions 12-23T
in subquery 3-34T
MAX function, syntax 1-583S
MIN function, syntax 1-583S
null value signalled 5-13T
restrictions in modifiable view
10-25T
restrictions with GROUP BY
1-420S
SUM function, syntax 1-583S
summary 1-587S
Algebraic functions
ABS function 1-563S
MOD function 1-563S
POW function 1-564S
ROOT function 1-564S
ROUND function 1-564S
SQRT function 1-565S
syntax 1-560S
TRUNC function 1-566S
Alias
for a table in SELECT 1-409S
for table name 2-79T
to assign column names in
temporary table 3-13T
use with GROUP BY clause
1-420S, 1-424S
with self-join 3-11T
ALL keyword
beginning a subquery
3-32T, 1-415S
DISCONNECT statement 1-229S
syntax
in expression 1-583S
in GRANT 1-308S
in REVOKE 1-386S
in SELECT 1-397S
with UNION operator 1-395S
use
in Condition subquery 1-530S
in expression 1-585S
in GRANT 1-310S
in SELECT 1-399S
with UNION operator 1-432S
with dbschema utility
5-41R, 5-46R
ALLOCATE DESCRIPTOR
statement
syntax 1-14S
with concatenation operator
1-548S
Allocating memory with the
ALLOCATE DESCRIPTOR
statement 1-14S
ALTER FRAGMENT statement
ADD Clause 1-31S
ATTACH clause 1-19S
attaching with fragment
expression 1-23S
attaching with round robin 1-22S
DETACH clause 1-36S
DROP clause 1-33S
effects on BLOB columns 1-23S
effects on constraints 1-24S
effects on indexes 1-24S
effects on triggers 1-24S
effects on triggers, constraints,
indexes 1-21S
example 9-37T
how executed 1-18S
INIT clause 9-41T, 1-24S
MODIFY clause 9-36T, 1-34S
privileges needed to alter
fragments 1-18S
syntax 1-17S
use 1-18S
ALTER INDEX statement
creating clustered index 1-39S
dropping clustered index 1-40S
locks table 7-8T
syntax 1-39S
ALTER keyword
syntax
in GRANT 1-304S
in REVOKE 1-386S
use
in GRANT 1-310S
in REVOKE 1-387S
Alter privilege 10-10T, 1-310S
ALTER TABLE statement
ADD clause 1-44S
ADD CONSTRAINT clause 1-61S
ADD ROWIDS clause 9-41T
adding
a column 1-44S
a column constraint 1-60S
rowids 1-65S
and NCHAR column 1-22R
and NVARCHAR column 1-22R
cascading deletes 1-52S
changing column data type
9-21T, 1-57S
changing table lock mode 1-65S
CHECK clause 1-54S
DEFAULT clause 1-45S
DROP clause 1-56S
DROP CONSTRAINT clause
1-63S
DROP ROWIDS clause 9-41T
dropping
a column 1-56S
a column constraint 1-63S
rowids 1-66S
LOCK MODE clause 1-65S
MODIFY NEXT SIZE clause
2-11R, 1-64S
ON DELETE CASCADE keyword
1-49S
PAGE keyword 1-65S
privilege for 10-10T, 1-304S
reclustering a table 1-40S
REFERENCES clause 1-49S
ROW keyword 1-65S
rules for primary key constraints
1-62S
rules for unique constraints 1-62S
American National Standards
Institute. See ANSI.
AND keyword
syntax in Condition segment
1-517S
use
in Condition segment 1-531S
with BETWEEN keyword
1-412S
AND logical operator 2-37T, 1-531S
ANSI 1-17T
ANSI compliance
-ansi flag 4-18R
DBANSIWARN environment
variable 4-18R
ANSI-compliance
-ansi flag
Intro-8S, 1-124S, 1-130S, 1-19
4S
described 1-10R
determining 1-11R
list of SQL statements 1-11S
reserved words 1-593S
table naming 1-380S
updating rows 1-493S
ANSI-compliant database
buffered logging restricted in
9-25T
constraint naming 1-534S
create with START DATABASE
1-482S
description of 1-17T, 1-96S
designating 1-11R
effect on
cursor behavior 1-15R
decimal data type 1-15R
default isolation level 1-14R
escape characters 1-15R
object privileges 1-14R
owner-naming 1-13R
SQLCODE 1-16R
transaction logging 1-13R
transactions 1-13R
FOR UPDATE not required in
6-16T, 1-207S
owner-naming 1-13R
privileges 1-14R
procedure naming 1-622S
reason for creating 1-11R
signalled in SQLAWARN 5-13T
SQL statements allowed 1-16R
synonym naming 1-633S
use
in CREATE VIEW 1-195S
in GRANT 1-312S
with display labels 1-402S
with table aliases 1-410S
ASC keyword
syntax
in SELECT 1-423S
syntax, in CREATE INDEX 1-99S
use
in SELECT 1-425S
use, in CREATE INDEX 1-102S
Ascending order in SELECT 2-15T
ASCII collating order 1-17R, 1-629S
ASIN function
syntax in expression 1-577S
use in expression 1-579S
Asterisk
wild card character in SELECT
2-12T
Asterisk (*)
arithmetic operator 1-546S
use in SELECT 1-397S
At (@) sign, in database name
1-535S
ATAN function
syntax in expression 1-577S
use in expression 1-579S
ATAN2 function
syntax in expression 1-577S
use in expression 1-579S
Attached index 1-104S
Attribute
identifying 8-16T
important qualities of 8-16T
nondecomposable 8-17T
Audit trail
applying with RECOVER TABLE
1-373S
dropping with DROP AUDIT
1-230S
manipulating audit trail file
1-375S
no clustered index 1-101S
starting with CREATE AUDIT
1-92S
Automatic type conversion. See
Data type conversion.
Index
AVG function
as aggregate function 2-53T
syntax in expression 1-583S
use in expression 1-586S
B
Bachman, C.R. 8-19T
Backslash (\)
as escape character with LIKE
1-524S
as escape character with
MATCHES 1-525S
Backup. See Archive.
BEFORE keyword 1-171S
BEGIN WORK statement
locking in a transaction 1-67S
specifies start of a transaction
4-26T
syntax 1-67S
BETWEEN keyword
syntax in Condition segment
1-519S
use
in Condition segment 1-522S
in SELECT 1-412S
BETWEEN keyword, used to test
for equality in WHERE clause
2-29T
BETWEEN operator 2-33T
Binary Large Object
location shown in sysblobs table
2-13R
Binary Large Object (BLOB)
attaching tables 1-23S
effect of isolation on retrieval
1-465S, 1-480S
in a LOAD statement 1-333S
in an UNLOAD statement 1-487S
increasing buffer size 4-20R
setting buffer size 4-20R
Boolean expression
and logical operator 2-37T
in Condition segment 1-517S
with TEXT data type 3-25R
Bourne shell
how to set environment variables
4-8R
.profile file 4-7R
Buffer
setting size of fetch buffer 4-39R
BUFFERED keyword, syntax in SET
LOG 1-470S
BUFFERED LOG keywords
syntax in CREATE DATABASE
1-94S
use in CREATE DATABASE 1-96S
Buffered logging 9-25T, 1-94S
Building your data model
8-3T to 8-36T
BYTE data type
considerations for UNLOAD
statement 1-487S
description of 9-21T, 3-5R
inserting data 3-6R
requirements for LOAD
statement 1-333S
restrictions
in Boolean expression 3-5R
with GROUP BY 3-6T, 3-5R
with LIKE or MATCHES
2-39T, 3-5R
with ORDER BY 3-5R
with relational expression 2-30T
selecting a BYTE column 3-6R
syntax 1-540S
with stored procedures
2-11S, 2-16S
BYTE value, displaying 2-11T
C
C compiler
setting INFORMIXC environment
variable 4-40R
C shell
how to set environment variables
4-8R
.cshrc file 4-7R
.login file 4-7R
Calculated expression
restrictions with GROUP BY
1-420S
Index
Column name
allowable characters 1-591S
using functions as names 1-596S
using keywords as names 1-597S
when qualified 1-180S
Column number 2-23T
effect on triggers 1-170S
Column value
in triggered action 1-182S
qualified vs. unqualified 1-183S
when unqualified 1-182S
Column-level privilege
10-11T, 1-310S
described in syscolauth table
2-15R
Column-level privileges
in syscolauth table 2-9R
COLUMNS FOR keywords, in
INFO statement 1-315S
Columns of a fragmented table,
modifying 9-36T
Command file, dbload 5-29R
Command script, creating database
9-29T
Comments about documentation
vR
Commit, two-phase 11-22T
COMMIT WORK statement
closes cursors 7-22T
releases locks 7-10T, 7-22T
sets SQLCODE 6-5T
syntax 1-77S
Committed Read isolation level
1-464S
Committed Read isolation level
(Informix) 7-13T
COMMITTED READ keywords,
syntax in SET ISOLATION
1-463S
Comparison condition
description of 2-29T
syntax and use 1-519S
Compiler
environment variable for C 4-40R
environment variable for COBOL
4-40R
setting environment variable for
COBOL 4-43R
CONSTRAINT keyword
in ALTER TABLE 1-60S
in CREATE TABLE 1-136S
Consumed table 1-20S
CONTINUE keyword, in the
WHENEVER statement
1-510S, 1-515S
CONTINUE statement
exiting a loop 12-26T
syntax 2-8S
Conventions
example code
Intro-7T, Intro-9R, Intro-11S
for naming tables 1-129S
typographical
Intro-5T, Intro-5R, Intro-5S
Converting data types 3-28R
Coordinated deletes 6-6T
Correlated subquery
definition of 3-31T, 1-527S
restriction with cascading deletes
4-23T
Correlation name
and stored procedures 1-181S
in COUNT DISTINCT clause
1-181S
in GROUP BY clause 1-181S
in SET clause 1-181S
in stored procedure 1-185S
new 1-177S
old 1-177S
rules for 1-181S
scope of 1-181S
table of values 1-183S
using 1-181S
when to use 1-181S
COS function
syntax in expression 1-577S
use in expression 1-578S
COUNT DISTINCT clause 1-181S
COUNT field
getting contents with GET
DESCRIPTOR 1-278S
setting value for WHERE clause
1-449S
use in GET DESCRIPTOR 1-280S
COUNT function
and GROUP BY 3-6T
as aggregate function 2-53T
Index
D
Daemon 11-15T
Data
connecting to 11-14T
containing foreign characters
1-22R
how to access in fragmented
tables 9-39T
inserting with the LOAD
statement 1-329S
integrity 11-22T
Data access statements 1-10S
Data definition statements
5-36T, 1-8S
Data distributions
confidence 1-508S
on temporary tables 1-509S
RESOLUTION 1-507S, 1-508S
specifying disk space to use 4-37R
DATA field
setting with SET DESCRIPTOR
1-452S
Data integrity
4-23T to 4-27T, 11-22T
statements 1-10S
Data manipulation statements 1-9S
Data model
attribute 8-16T
building 8-3T to 8-36T
defining relationships 8-9T
description of 1-3T, 8-3T
entity-relationship 8-5T
many-to-many relationship 8-12T
one-to-many relationship 8-12T
one-to-one relationship 8-12T
See also Relational model.
telephone-directory example 8-6T
Data protection
with OnLine 11-21T
Data replication 11-21T
Data type
approximate 2-50R
automatic conversions 5-16T
BYTE 9-21T, 3-5R
changing with ALTER TABLE
1-59S
CHAR 9-17T, 3-6R
CHARACTER 3-7R
character data 9-17T
CHARACTER VARYING
9-18T, 3-8R
CHAR, mapping to NCHAR
4-17R
choosing 9-21T
chronological 9-13T
considerations for INSERT
1-325S, 1-627S
conversion 4-9T, 3-28R
DATE 9-13T, 3-9R
DATETIME 9-14T, 3-9R
DEC 3-12R
DECIMAL 9-11T, 9-12T, 3-13R
DOUBLE PRECISION 3-15R
exact numeric 2-50R
fixed-point 9-12T
FLOAT 3-15R
floating-point 9-10T, 3-15R
in SPL variables 12-20T
INT 3-15R
INTEGER 9-8T, 3-16R
INTERVAL 9-15T, 3-16R
MONEY 9-12T, 3-19R
NCHAR 9-17T, 3-20R
NCHAR, mapping to CHAR
4-17R
NUMERIC 3-21R
numeric 9-8T
NVARCHAR 9-18T, 3-21R
REAL 9-10T, 3-23R
requirements for referential
constraints 1-52S, 1-145S
segment 1-539S
SERIAL 9-8T, 3-23R
SMALLFLOAT 9-10T, 3-24R
SMALLINT 3-24R
Index
stores7
Intro-9T, Intro-11R, Intro-13S
stores7 description of 51
table names 11-18T
Database Administrator (DBA)
10-7T, 1-307S
Database lock 7-7T
Database management system
11-4T
Database Name segment
database outside DBPATH 1-538S
for remote database 1-537S
naming conventions 1-535S
naming with variable 1-538S
syntax 1-535S
using quotes, slashes 1-538S
Database server
attributes in Information Schema
view 2-51R
choosing OnLine or SE 1-4R
configuration 11-17T
definition of 1-19T
effect of server type on
available data types 1-4R
isolation level 1-7R
locking 1-6R
rolling back transactions 1-5R
SQL statements supported 1-8R
system catalog tables 1-8R
transaction logging 1-5R
local 11-6T
remote 11-9T
setting SQLEXEC 4-64R
specifying default for connection
4-46R
SQLRM environment variable
4-65R
SQLRMDIR environment variable
4-65R
DATABASE statement
determining database type 1-198S
exclusive mode 7-7T, 1-200S
locking 7-7T
specifying current database
1-198S
SQLAWARN after 5-13T, 1-199S
syntax 1-198S
using with program variables
1-199S
10
Database-level privilege
description of 4-15T, 1-306S
granting 1-306S
passing grant ability 1-311S
revoking 1-388S
See also Privilege.
Data-distribution information
in sysdistrib table 2-24R
Dataskip
skipping unavailable dbspaces
1-440S
DATE data type
converting to DATETIME 3-30R
description of 9-13T, 3-9R
functions in 2-56T, 1-573S
in ORDER BY sequence 2-15T
range of operations 3-30R
representing DATE values 3-34R
specify display format 4-21R
syntax 1-540S
using with DATETIME and
INTERVAL values 3-34R
DATE function
as time function 2-56T
syntax in expression 1-573S
use in expression 2-60T, 1-574S
Date value
setting DBDATE environment
variable 4-21R
DATETIME data type
adding or subtracting INTERVAL
values 3-33R
as quoted string 1-626S
character string values 3-12R
converting to DATE 3-30R
CURRENT keyword 3-34R
description of 9-14T, 3-9R
displaying format 2-60T, 9-16T
field qualifiers 3-10R, 1-543S
formats with DBTIME 4-34R
functions on 2-56T
in
expression 1-556S
INSERT 1-627S
ORDER BY sequence 2-15T
relational expressions 2-30T
multiplying values 3-32R
precision and size 9-15T, 3-10R
range of expressions 3-31R
DEALLOCATE DESCRIPTOR
statement
syntax 1-201S
with concatenation operator
1-548S
DEC data type 3-12R
DECIMAL data type
changing data types 3-28R
description of 3-13R
disk storage 3-13R
fixed-point 9-12T
floating-point 9-11T, 3-13R
signalled in SQLAWARN 5-13T
syntax 1-540S
DECIMAL data type, using as
default value 1-46S, 1-134S
Decimal point (.)
as delimiter in DATETIME 3-11R
as delimiter in INTERVAL 3-18R
DECLARE statement
cursor characteristics 1-208S
cursor types 1-206S
cursors with prepared statements
1-214S
cursors with transactions 1-215S
definition and use
hold cursor 1-209S
insert cursor 1-208S, 1-216S
procedure cursor 1-207S
scroll cursor 1-208S
select cursor 1-207S
sequential cursor 1-208S
update cursor 1-207S, 1-211S
description of 5-21T
FOR INSERT clause 6-9T
FOR UPDATE 6-15T
insert cursor 1-206S
insert cursor with hold 1-217S
procedure cursor 1-206S
restrictions with SELECT with
ORDER BY 1-427S
SCROLL keyword 5-24T
syntax 1-203S
update cursor 1-206S
updating specified columns
1-212S
Index
11
use
with concatenation operator
1-548S
with FOR UPDATE keywords
1-207S
WITH HOLD clause 7-23T
with SELECT 1-406S
DEFAULT keyword 1-228S
in the CONNECT statement 1-80S
Default value
description of 4-19T
specifying
with ALTER TABLE 1-46S
with CREATE TABLE 1-134S
Defaults
column, in sysdefaults table 2-22R
Deferred checking 1-438S
DEFERRED keyword, in the SET
CONSTRAINTS statement
1-438S
DEFINE statement
in stored procedures 12-20T
placement of 2-11S
syntax 2-9S
DELETE keyword
syntax
in GRANT 1-308S
in REVOKE 1-386S
use
in GRANT 1-309S
in REVOKE 1-387S
Delete privilege
10-9T, 10-29T, 1-308S
DELETE REFERENCING clause
and FOR EACH ROW section
1-177S
syntax 1-175S
DELETE statement
all rows of table 4-4T
and end of data 6-14T
applied to view 10-25T
as triggering statement 1-167S
cascading 1-219S
coordinated deletes 6-6T
count of rows 6-4T
CURRENT OF clause 1-220S
description of 4-4T
embedded 5-7T, 6-3T to 6-8T
in trigger event 1-166S
12
DISTINCT keyword
relation to GROUP BY 3-4T
restrictions in modifiable view
10-25T
syntax
in expression 1-583S
in SELECT 1-397S
syntax, in CREATE INDEX 1-99S
use
in SELECT 2-19T, 1-399S
no effect in subquery 1-528S
with COUNT function 2-54T
use, in CREATE INDEX 1-101S
DISTINCT, synonym for UNIQUE
1-48S
Distributed deadlock 7-18T
Distributed processing 11-10T
Distribution scheme
changing the number of
fragments 9-38T
Distributions
dropping with DROP
DISTRIBUTIONS clause
1-507S
privileges required to create
1-508S
using the HIGH keyword 1-508S
using the MEDIUM keyword
1-508S
Division (/) symbol, arithmetic
operator 1-546S
DML statements, summary 1-9S
DOCUMENT keyword, use in
stored procedures 12-7T
Documentation comments vR
Documentation notes
Intro-8T, Intro-10R, Intro-12S
Dominant table 3-21T
Dormant connection 1-229S
DOS operating system 11-5T
DROP AUDIT statement 1-230S
DROP CONSTRAINT keywords
syntax in ALTER TABLE 1-42S
use in ALTER TABLE 1-63S
DROP DATABASE statement
1-231S
DROP INDEX statement
locks table 7-8T
syntax 1-233S
DROP keyword
syntax in ALTER TABLE 1-42S
use in ALTER TABLE 1-56S
DROP ROWIDS clause, of ALTER
TABLE 9-41T
DROP SYNONYM statement
1-236S
DROP TABLE statement 1-238S
DROP TRIGGER statement
syntax 1-240S
use of 1-240S
DROP VIEW statement 1-242S
Dropping a fragment 9-39T
Duplicate values
finding 3-16T
in a query 1-399S
Dynamic management statements
1-9S
Dynamic SQL
cursor use with 5-33T
description of 5-5T, 5-30T
freeing prepared statements 5-35T
E
Editor, specifying with DBEDIT
4-23R
Effective checking 1-438S
Ellipses (...), wildcard in Condition
segment 1-525S
Embedded SQL
defined 5-4T
languages available 5-4T
End of data
signal in SQLCODE 5-12T, 5-18T
signal only for SELECT 6-14T
when opening cursor 5-21T
Entity
attributes associated with 8-16T
business rules 8-5T
criteria for choosing 8-8T
defined 8-5T
important qualities of 8-5T
in telephone-directory example
8-8T
integrity 4-18T
naming 8-5T
represented by a table 8-24T
Index
13
INFORMIXCOBDIR 4-41R
INFORMIXCOBSTORE 4-42R
INFORMIXCOBTYPE 4-43R
INFORMIXCONRETRY 4-43R
INFORMIXCONTIME 4-44R
INFORMIXDIR 11-16T, 4-46R
INFORMIXSERVER
11-16T, 4-46R
INFORMIXSHMBASE 4-47R
INFORMIXSTACKSIZE 4-48R
INFORMIXTERM 4-49R
LANG 1-23R, 4-49R
LANG, and crtcmap utility 5-5R
LC_COLLATE 4-51R
LC_CTYPE 4-53R
LC_MONETARY 4-55R
LC_NUMERIC 4-56R
LC_TIME 4-57R
listed, by topic 4-68R
modifying 4-9R
ONCONFIG 4-59R
OPTCOMPIND 4-59R
overriding a setting 4-7R, 4-38R
PATH 11-16T, 4-60R
PDQPRIORITY 4-61R
PSORT_DBTEMP 4-62R
PSORT_NPROCS 4-63R
rules of precedence 4-10R
setting
at the command line 4-6R
in a login file 4-6R
in a shell file 4-7R
in an environmentconfiguration file 4-6R
SQLEXEC 4-64R
SQLRM 4-65R
SQLRMDIR 4-65R
TERM 4-66R
TERMCAP 11-16T, 4-66R
TERMINFO 4-67R
types of 4-5R
view current setting 4-9R
where to set 4-7R
Equals (=) relational operator
2-30T, 2-71T
Equi-join 2-71T
ERROR 1-513S
14
Error checking
continuing after error in stored
procedure 2-39S
error status with ON EXCEPTION
2-36S
exception handling 12-31T
in stored procedures 12-31T
simulating errors 12-34T
with SYSTEM 2-46S
ERROR keyword, in the
WHENEVER statement 1-510S
Error messages
for NLS 1-24R
for trigger failure 13-14T
generating in a trigger 13-13T
retrieving trigger text in a
program 13-15T, 13-16T
using to identify NLS database
server 1-21R
Errors
after DELETE 6-4T
at compile time 12-7T
codes for 5-13T
dealing with 5-18T
detected on opening cursor 5-21T
during updates 4-23T
in stored procedure syntax 12-8T
inserting with a cursor 6-11T
ISAM error code 5-13T
ESCAPE keyword
syntax in Condition segment
1-519S
use
in Condition segment 1-524S
with LIKE keyword
1-413S, 1-525S
with MATCHES keyword
1-414S, 1-526S
with WHERE keyword
2-45T, 1-413S
ESQL
cursor use 5-20T to 5-29T
DELETE statement in 6-3T
delimiting host variables 5-7T
dynamic embedding 5-5T, 5-30T
error handling 5-18T
fetching rows from cursor 5-22T
host variable 5-6T, 5-8T
indicator variable 5-17T
INSERT in 6-8T
NLS errors in SQLERRM field
1-21R
overview
5-3T to 5-39T, 6-3T to 6-18T
preprocessor 5-4T
scroll cursor 5-24T
selecting single rows 5-14T
SQL Communications Area 5-9T
SQLCODE 5-12T
SQLERRD fields 5-13T
static embedding 5-5T
UPDATE in 6-15T
EXCLUSIVE keyword
syntax
in DATABASE 1-198S
in LOCK TABLE 1-336S
use
in DATABASE 1-200S
in LOCK TABLE 1-337S
Exclusive lock 7-6T
Executable programs
where to search 4-60R
EXECUTE IMMEDIATE statement
description of 5-36T
restricted statement types 1-254S
syntax and usage 1-253S
using with concatenation operator
1-548S
EXECUTE ON keywords
syntax
in GRANT 1-304S
in REVOKE 1-384S
use
in GRANT 1-311S
in REVOKE 1-385S
EXECUTE PROCEDURE statement
1-256S
assigning values with 12-24T
associating cursor with
DECLARE 1-207S
in FOREACH 2-23S
in triggered action 1-179S
using 12-11T
with
INTO keyword 1-266S
EXECUTE statement
and sqlca record 1-246S
description of 5-32T
parameterizing a statement
1-247S
syntax 1-244S
USING DESCRIPTOR clause
1-249S
with concatenation operator
1-548S
with USING keyword 1-246S
Existence dependency 8-10T
EXISTS keyword
beginning a subquery 1-415S
in a WHERE clause 3-32T
use in condition subquery
10-28T, 1-529S
EXIT statement
exiting a loop 12-26T
syntax 2-17S
EXP function
syntax in expression 1-570S
use in expression 1-570S
Explicit temporary table 1-150S
Exponential function
EXP function 1-570S
Expression
date-oriented 2-56T
description of 2-47T
display label for 2-50T
in UPDATE 1-497S
ordering by 1-426S
Expression segment
aggregate expressions 1-583S
column expressions 1-548S
combined expressions 1-589S
constant expressions 1-551S
expression types 1-546S
function expressions 1-558S
in SPL expressions 1-589S
syntax 1-546S
Expression-based distribution
scheme
in ALTER FRAGMENT 1-29S
in CREATE INDEX 1-105S
in CREATE TABLE 1-161S
EXTEND function
syntax in expression 1-573S
use in expression 1-575S
with DATE, DATETIME and
INTERVAL
2-56T, 2-60T, 3-32R, 3-33R
extension
.lok 1-468S
Extension checking, specifying with
DBANSIWARN 4-18R
Extension, to SQL
symbol for Intro-8S
with ANSI-compliant database
1-16R
EXTENT SIZE keywords 1-162S
Extent, changing size of system
table 2-11R
F
FETCH statement
ABSOLUTE keyword 5-24T
as affected by CLOSE 1-72S
checking results with SQLCA
1-270S
description of 5-22T
fetching a row for update 1-269S
locking for update 1-269S
relation to GET DESCRIPTOR
1-278S
sequential 5-24T
specifying a values memory
location 1-265S
syntax 1-260S
with
concatenation operator 1-548S
program arrays 1-267S
scroll cursor 1-264S
sequential cursor 5-26T, 1-263S
X/Open mode 1-263S
FET_BUF_SIZE environment
variable 4-39R
Field delimiter files
DBDELIMITER 4-23R
Field qualifier
for DATETIME 3-10R, 1-543S
for INTERVAL 1-610S, 1-616S
File
compared to database 1-3T
environment configuration 4-6R
environment configuration,
checking with chkenv 5-4R
extension
.lok 1-468S
mapping, and COLLCHAR 4-16R
mapping, and crtcmap utility 5-5R
mapping, and DBAPICODE
4-19R
mapping, format for 5-7R
permissions in UNIX 10-4T
sending output with the OUTPUT
statement 1-349S
shell 4-7R
temporary for OnLine 4-33R
temporary for SE 4-34R
temporary, sorting 4-62R
termcap, terminfo 4-49R, 4-66R
FILE statement
character-position form 5-35R
delimiter form 5-30R
syntax for character-position form
5-36R
syntax for delimiter form 5-31R
with dbload 5-29R
Files
termcap, terminfo 4-67R
FILLFACTOR clause in CREATE
INDEX 1-108S
finding location of row 1-550S
FIRST keyword
syntax in FETCH 1-260S
use in FETCH 1-264S
First normal form 8-32T
Fixed point 9-12T
FLOAT data type
changing data types 3-28R
description of 9-10T, 3-15R
syntax 1-540S
FLOAT data type, using as default
value 1-46S, 1-134S
Floating point 9-10T
Index
15
FLUSH statement
count of rows inserted 6-11T
syntax 1-272S
with concatenation operator
1-548S
writing rows to buffer 6-10T
FOR EACH ROW action
SELECT statement in 1-173S
triggered action list 1-172S
FOR keyword
in CONTINUE 2-8S
in CREATE AUDIT 1-92S
in CREATE SYNONYM 1-125S
in EXIT 2-17S
FOR statement
looping in a stored procedure
12-26T
specifying multiple ranges 2-22S
syntax 2-19S
using expression lists 2-22S
using increments 2-21S
FOR TABLE keywords, in UPDATE
STATISTICS 1-503S
FOR UPDATE keywords
conflicts with ORDER BY 6-8T
not needed in ANSI-compliant
database 6-16T
relation to UPDATE 1-500S
specific columns 6-16T
syntax in DECLARE 1-203S
use
in DECLARE
1-207S, 1-211S, 1-214S
in SELECT 1-427S
with column list 1-212S
FOREACH keyword
in CONTINUE statement 2-8S
in EXIT 2-17S
FOREACH statement
looping in a stored procedure
12-26T
syntax 2-23S
Foreign key
4-20T, 1-51S, 1-141S, 1-144S
FOREIGN KEY keywords
in ALTER TABLE 1-60S
in CREATE TABLE 1-138S
16
Format
for crtcmap mapping file 5-7R
specifying for DATE value with
DBDATE 4-21R
specifying for DATETIME value
with DBTIME 4-34R
specifying for money format with
DBMONEY 4-25R
FRACTION keyword
syntax
in DATETIME data type 1-543S
in INTERVAL data type 1-610S
use
as DATETIME field qualifier
3-10R, 1-613S
as INTERVAL field qualifier
3-17R, 1-616S
Fragment
altering 9-37T
dropping 9-39T
modifying with ALTER
FRAGMENT 1-17S
Fragmentation
adding a fragment 1-31S
adding rowids with ALTER
TABLE 1-65S
adding rowids with CREATE
TABLE 1-157S
altering fragments 1-17S
alter, attaching tables 1-19S
and BLOB columns 1-23S
combining tables 1-19S
defining a new fragmentation
strategy 1-19S
defining and initializing 1-24S
described 1-5R
detaching a table fragment 1-36S
dropping an existing fragment
1-33S
dropping rowids with ALTER
TABLE 1-66S
expression-based distribution
scheme 1-29S, 1-105S, 1-161S
fragment expressions
1-23S, 1-29S, 1-106S
if you run out of log/disk space
1-19S
indexes, by expression with
CREATE INDEX 1-105S
use
in PUT 1-368S
in SELECT 1-408S
Function
aggregate 2-53T
algebraic 1-560S
date-oriented 2-56T
in SELECT statements 2-53T
within a stored procedure 12-26T
Function expression
Algebraic functions 1-558S
DBINFO function 1-566S
description of 1-558S
Exponential and logarithmic
functions 1-558S
HEX function 1-558S
in SELECT 1-400S
LENGTH function 1-558S
Time functions 1-558S
Trigonometric functions 1-558S
TRIM function 1-558S
Functional dependency 8-33T
G
GET DESCRIPTOR statement
syntax 1-278S
the COUNT keyword 1-280S
use with FETCH statement 1-268S
with concatenation operator
1-548S
X/Open mode 1-281S
GET DIAGNOSTICS statement
CLASS_ORIGIN keyword 1-295S
CONNECTION_NAME
keyword 1-298S
exception clause 1-293S
MESSAGE_LENGTH keyword
1-295S
MESSAGE_TEXT keyword 1-295S
MORE keyword 1-292S
NUMBER keyword 1-292S
purpose 1-285S
RETURNED_SQLSTATE
keyword 1-295S
ROW_COUNT keyword 1-292S
Hold cursor
definition of 7-22T, 1-208S
insert cursor with hold 1-217S
use of 1-209S
Host machine 11-9T
Host variable
delimiter for 5-7T
description of 5-6T
dynamic allocation of 5-34T
fetching data into 5-22T
in DELETE statement 6-4T
in INSERT 6-8T
in UPDATE 6-15T
in WHERE clause 5-15T
INTO keyword sets 5-15T
null indicator 5-17T
restrictions in prepared statement
5-30T
truncation signalled 5-13T
using non-English characters in
1-25R
with EXECUTE 5-32T
HOUR keyword
syntax
in DATETIME data type 1-543S
in INTERVAL data type 1-610S
use
as DATETIME field qualifier
3-10R, 1-613S
as INTERVAL field qualifier
3-17R, 1-616S
Hyphen (-)
as delimiter in DATETIME 3-11R
as delimiter in INTERVAL 3-18R
Index
17
18
characteristics of 1-11T
creating demonstration database
Intro-12R, Intro-14S
is NLS-ready 1-17R
signalled in SQLAWARN 5-13T
when tables are locked 7-8T
INFORMIX-OnLine/Optical 11-6T
list of statements 1-11S
INFORMIX-SE
characteristics of 1-10T
creating database 9-25T
creating demonstration database
Intro-12R, Intro-14S
is NLS-ready 1-17R
INFORMIXSERVER environment
variable 11-16T, 4-46R, 1-80S
INFORMIXSHMBASE
environment variable 4-47R
INFORMIX-SQL
creating database with
5-36T, 9-30T
UNLOAD statement 9-30T
INFORMIXSTACKSIZE
environment variable 4-48R
INFORMIXTERM environment
variable 4-49R
informix.rc file 4-6R
Insert buffer
counting inserted rows
1-274S, 1-371S
filling with constant values 1-366S
inserting rows with a cursor
1-322S
storing rows with PUT 1-365S
triggering flushing 1-370S
Insert cursor 1-206S
closing 1-72S
definition of 6-9T, 1-206S
in INSERT 1-322S
in PUT 1-367S
opening 1-343S
reopening 1-344S
result of CLOSE in SQLCA 1-72S
use of 6-11T, 1-208S
with hold 1-217S
INSERT INTO keywords
in INSERT 1-319S
in LOAD 1-334S
INSERT keyword
syntax
in GRANT 1-308S
in REVOKE 1-386S
use
in GRANT 1-309S
in REVOKE 1-387S
Insert privilege 10-9T, 10-29T
INSERT REFERENCING clause
and FOR EACH ROW section
1-177S
syntax 1-174S
INSERT STATEMENT
using functions in the VALUES
clause 1-326S
INSERT statement
and end of data 6-14T
character-position form 5-35R
constant data with 6-11T
count of rows inserted 6-11T
delimiter form 5-30R
duplicate values in 4-8T
effect of transactions 1-323S
embedded 6-8T to 6-14T
filling insert buffer with PUT
1-365S
in dynamic SQL 1-328S
in trigger event 1-166S
in triggered action 1-179S
inserting
multiple rows 4-10T
nulls with the VALUES clause
1-327S
rows 4-7T
rows through a view 1-321S
rows with a cursor 1-322S
single rows 4-7T
values into SERIAL columns
3-23R
null values in 4-8T
number of rows 5-13T
privilege for 10-6T, 10-9T
SELECT statement in 4-10T
SERIAL columns 1-326S
specifying values to insert 1-324S
syntax 1-319S
for character position form
5-36R
for delimiter form 5-31R
use with insert cursor 1-216S
VALUES clause 4-7T
with
a view 10-26T
DECLARE 1-203S
SELECT 1-327S
with dbload 5-29R
Inserting rows of constant data
6-11T
Installation directory, specifying
with INFORMIXDIR 4-46R
Installation files
INFORMIXDIR environment
variable 4-46R
INTEGER data type
changing data types 3-28R
description of 9-8T, 3-16R
syntax 1-540S
INTEGER data type, using as
default value 1-46S, 1-134S
Integrity. See Data integrity.
Intensity attributes, setting
INFORMIXTERM for 4-49R
Interrupt key
with dbexport 5-11R
with dbimport 5-17R
with dbload 5-26R
Interrupted modifications 4-23T
INTERVAL data type
adding or subtracting from 3-36R
adding or subtracting from
DATETIME values 3-33R
as quoted string 1-626S
description of 9-15T, 3-16R
display format 9-16T
field delimiters 3-18R
field qualifier, syntax 1-610S
in expression 1-557S
in INSERT 1-627S
in relational expressions 2-30T
multiplying or dividing values
3-36R
precision and size 9-16T
range of expressions 3-31R
Index
19
20
description of 7-11T
Dirty Read 1-464S
in external tables 1-465S, 1-476S
Informix Committed Read 7-13T
Informix Cursor Stability 7-13T
Informix Dirty Read 7-12T
Informix Repeatable Read 7-15T
Read Committed 1-479S
Read Uncommitted 1-478S
Repeatable Read 1-464S, 1-479S
Serializable 1-479S
setting 7-11T
use with FETCH statement 1-269S
items table in stores7 database,
columns in 54
ITYPE field
SET DESCRIPTOR statement
1-452S
setting with SET DESCRIPTOR
1-453S
with X/Open programs 1-281S
J
Join
associative 2-76T
creating 2-71T
definition of 2-9T
dominant table 3-21T
equi-join 2-71T
in Condition segment 1-416S
multiple-table join 2-77T, 1-418S
natural 2-75T
nested outer 3-27T
nested simple 3-24T
outer 3-21T
outer join 1-419S
restrictions in modifiable view
10-25T
self-join 3-11T, 1-418S
subservient table 3-21T
two-table join 1-418S
Join column. See Foreign key.
K
Key lock 7-9T
Keywords, using in triggered action
1-180S
Key, composite 8-25T
Key, primary 8-25T
Korn shell
how to set environment variables
4-8R
.profile file 4-7R
L
Label 2-50T, 3-45T
LANG environment variable
1-18R, 1-23R, 4-49R
Language environment
DBLANG 4-24R
selecting with LANG
environment variable 4-49R
setting with DBLANG 4-24R
Language supplement for added
NLS functionality 1-26R
LAST keyword
syntax in FETCH 1-260S
use in FETCH 1-264S
LC_COLLATE environment
variable 1-19R, 4-51R
LC_CTYPE environment variable
1-19R, 4-53R
LC_MONETARY environment
variable 1-19R, 4-55R
LC_NUMERIC environment
variable 1-19R, 4-56R
LC_TIME environment variable
1-19R, 4-57R
LENGTH field
setting with SET DESCRIPTOR
1-452S
with DATETIME and INTERVAL
types 1-453S
with DECIMAL and MONEY
types 1-453S
LENGTH function
in expression 1-400S
on TEXT 2-63T
on VARCHAR 2-63T
syntax in expression
1-558S, 1-572S
use in expression 2-62T, 1-572S
LET statement
assigning values 12-24T
executing a procedure 12-11T
syntax 2-32S
LIKE keyword
syntax in Condition segment
1-519S
use in SELECT 1-413S
wildcard characters 1-413S
LIKE keyword, used to test for
equality in WHERE clause 2-29T
LIKE relational operator 2-38T
Literal
DATETIME
in Condition segment 1-519S
in expression 1-551S, 1-556S
segment 1-613S
syntax 1-613S
syntax in INSERT 1-324S
use in ALTER TABLE 1-45S
use in CREATE TABLE 1-133S
with IN keyword 1-412S
DATE, using as a default value
1-46S, 1-134S
INTERVAL
in Condition segment 1-519S
in expression 1-551S, 1-557S
segment 1-616S
syntax 1-616S
syntax in INSERT 1-324S
using as default value
1-46S, 1-134S
Number
in Condition segment 1-519S
in expression 1-551S, 1-555S
segment 1-619S
syntax 1-619S
syntax in INSERT 1-324S
with IN keyword 1-523S
LOAD statement
DELIMITER clause 1-334S
INSERT INTO clause 1-334S
loading VARCHAR, TEXT, or
BYTE data types 1-333S
specifying field delimiter with
DBDELIMITER 4-23R
Index
21
M
Machine notes
Intro-8T, Intro-10R, Intro-12S
Mail
sending from stored procedure
2-46S
Mandatory, entity in relationship
8-10T
Many-to-many relationship
8-10T, 8-12T, 8-29T
Mapping files
COLLCHAR 4-16R
DBAPICODE 4-19R
Mapping files for non-standard
code sets 5-5R
22
MATCHES keyword
syntax in Condition segment
1-519S
use
in Condition segment 1-524S
in SELECT 1-413S
with NLS 2-43T
used to test for equality in
WHERE clause 2-29T
wildcard characters 1-414S
MATCHES relational operator
in WHERE clause 2-38T
MAX function
as aggregate function 2-53T
syntax in expression 1-583S
use in expression 1-586S
MDY function
as time function 2-56T
syntax in expression 1-573S
Memory
allocating for a system sqlda
structure 1-14S
shared 11-8T
Message files
error messages
Intro-8T, Intro-10R, Intro-12S
setting LANG for NLS 4-49R
specifying subdirectory for NLS
1-25R
specifying subdirectory with
DBLANG 4-24R
MIN function
as aggregate function 2-53T
syntax in expression 1-583S
use in expression 1-586S
Minus (-) sign, arithmetic operator
1-546S
MINUTE keyword
syntax
in DATETIME data type 1-543S
in INTERVAL data type 1-610S
use
as DATETIME field qualifier
3-10R, 1-613S
as INTERVAL field qualifier
3-17R, 1-616S
MOD function
syntax in expression 1-560S
use in expression 1-563S
MONTH keyword
syntax
in DATETIME data type 1-543S
in INTERVAL data type 1-610S
use
as DATETIME field qualifier
3-10R, 1-613S
as INTERVAL field qualifier
3-17R, 1-616S
Multiple triggers
column numbers in 1-170S
example 1-169S
order of execution 1-170S
preventing overriding 1-189S
Multiple-table join 2-77T
Multi-row query
destination of returned values
1-265S
managing with FETCH 1-262S
N
Naming convention
column 1-377S
database 1-537S
index 1-534S, 1-609S, 1-634S
table 1-129S, 1-592S, 1-637S
Naming conventions
tables 11-18T
Native Language Support. See NLS.
Natural join 2-75T
NCHAR data type
description of 9-17T, 3-20R
nonprintable characters 3-21R
syntax 1-540S
versus CHAR data type 1-22R
Nested ordering, in SELECT
2-16T, 1-426S
Network
computer 11-4T
connection information 11-17T
site 11-4T
Network environment variable
DBPATH 4-28R
SQLRM 4-65R
SQLRMDIR 4-65R
New features
for Version 7.1 Intro-12T
NEW keyword
in DELETE REFERENCING
clause 1-175S
in INSERT REFERENCING clause
1-174S
in UPDATE REFERENCING
clause 1-177S
NEXT keyword
syntax in FETCH 1-260S
use in FETCH 1-264S
NEXT SIZE keywords, use in
CREATE TABLE 1-162S
NLS
activating 2-25T, 4-26R
activating in Informix products
1-18R
and collation order 2-25T
and dbexport utility 5-14R
and dbimport utility 5-15R
and MATCHES keyword 2-43T
and ORDER BY keywords
2-25T, 2-43T
character attributes 4-53R
checking products for
functionality 1-21R
code sets 4-19R
collation 4-16R
COLLCHAR environment
variable 4-16R
creating character mapping files
for 5-5R
data types for 1-22R
database server compatibility
1-22R
Date and time formats 4-57R
DBAPICODE environment
variable 4-19R
DBNLS environment variable
4-26R
description of 1-16R
error messages for incompatibility
1-24R
functionality in Informix products
1-25R, 1-26R
functionality listed 1-17R
information in systables 2-42R
installation notes for language
supplement 1-26R
Index
23
24
O
OF keyword
syntax in DECLARE 1-203S
use in DECLARE 1-212S
OLD keyword
in DELETE REFERENCING
clause 1-175S
in INSERT REFERENCING clause
1-174S
in UPDATE REFERENCING
clause 1-177S
ON DELETE CASCADE keyword
DELETE trigger event 1-167S
ON EXCEPTION statement
placement of 2-36S
scope of control 12-32T
syntax 2-35S
trapping errors 12-31T
user-generated errors 12-34T
ON keyword
syntax
in GRANT 1-304S
in REVOKE 1-384S
syntax, in CREATE INDEX 1-99S
use
in GRANT 1-310S
P
PAGE keyword
use in ALTER TABLE 1-65S
use in CREATE TABLE 1-163S
Page lock 7-9T
Parallel distributed queries
SET PRIORITY statement 1-474S
setting with PDQPRIORITY
environment variable 4-61R
Parallel sorting 4-62R
setting PSORT_NPROCS 4-63R
Parameter
BYTE or TEXT in SPL 2-16S
in CALL statement 2-6S
to a stored procedure 12-28T
parameterizing
defined 1-247S
prepared statements 1-247S
Parameterizing a statement
with SQL identifiers 1-359S
Parent-child relationship
1-51S, 1-144S
Parts explosion 5-27T
PATH environment variable
11-16T, 4-60R
setting 4-9R
Pathname
for C compiler 4-40R
for COBOL compiler 4-40R
for database server 4-28R
for executable programs 4-60R
for installation 4-46R
for message files 4-24R
for parallel sorting 4-62R
for relay module 4-64R
for remote shell 4-32R
for temporary files in SE 4-34R
specifying with DBPATH 4-28R
specifying with PATH 4-60R
PDQ
OPTCOMPIND environment
variable 4-59R
PDQPRIORITY environment
variable 4-61R
SET PDQPRIORITY statement
1-474S
PDQPRIORITY
environment variable
values 4-61R
SET PDQPRIORITY statement
1-474S
Percent (%) sign, wildcard in
Condition segment 1-524S
PERFORM keyword, in the
WHENEVER statement 1-510S
Performance
buffered log 9-25T
depends on concurrency 7-3T
increasing with stored procedures
12-4T
using CHAR instead of NCHAR
1-22R
Permission, with SYSTEM 2-46S
Phantom row 1-464S, 1-478S
PIPE keyword, in the OUTPUT
statement 1-350S
Pipes, unnamed 11-8T
Plus (+) sign, arithmetic operator
1-546S
Populating tables 9-30T
POW function
syntax in expression 1-560S
use in expression 1-564S
Precedence, rules for environment
variables 4-10R
Precedence, rules for NLS
environment variables 4-11R
PRECISION field
setting with SET DESCRIPTOR
1-453S
with GET DESCRIPTOR 1-282S
PREPARE statement
description of 5-31T
error return in SQLERRD 5-13T
executing 1-244S
increasing performance efficiency
1-363S
missing WHERE signalled 5-11T
Index
25
26
Update
10-9T, 10-11T, 10-29T, 1-309S
when privileges conflict 1-305S
with DBA-privileged procedures
12-16T
with owner-privileged
procedures 12-16T
Privileges
user, described in sysusers table
2-44R
PRIVILEGES FOR keywords, in
INFO statement 1-317S
PRIVILEGES keyword
syntax
in GRANT 1-308S
in REVOKE 1-386S
use
in GRANT 1-310S
in REVOKE 1-387S
Procedure
compiled version in sysprocbody
table 2-32R
Procedure cursor
in DECLARE statement 1-206S
opening 1-342S
reopening 1-344S
Procedure name
conflict with function name
1-622S
naming conventions 1-622S
Procedure privileges
in sysprocauth table 2-31R
Processing, distributed 11-10T
Projection, described 2-7T
Project, description of 1-14T
Promotable lock
7-6T, 7-10T, 1-212S
Protected stored procedures 2-33R
PSORT_DBTEMP environment
variable 4-62R
PSORT_NPROCS environment
variable 4-63R
PUBLIC keyword
privilege granted to all users
10-7T
syntax
in GRANT 1-304S
in REVOKE 1-384S
use
in GRANT 1-307S
in REVOKE 1-386S
PUT statement
constant data with 6-11T
count of rows inserted 6-11T
impact on trigger 1-167S
sends returned data to buffer
6-10T
source of row values 1-366S
syntax 1-364S
use in transactions 1-366S
with concatenation operator
1-548S
with FLUSH 1-366S
Q
Qualifier, field
for DATETIME
3-10R, 1-543S, 1-613S
for INTERVAL 1-610S, 1-616S
Query
cyclic 4-23T
piping results to another program
1-350S
self-referencing 4-23T
sending results to an operating
system file 1-349S
sending results to another
program 1-350S
stated in terms of data model 1-7T
Query optimization information
in sysprocplan table 2-34R
Query optimization information
statements 1-10S
Question (?) mark
as placeholder in PREPARE
1-352S
naming variables in PUT 1-368S
replacing with USING keyword
1-345S
wildcard in Condition segment
1-525S
Quoted string
in expression 1-551S
syntax
in Condition segment 1-519S
in expression 1-583S
in INSERT 1-324S
use
in expression 1-553S
in INSERT 1-627S
with LIKE, MATCHES
keywords 1-413S
Quoted String segment
DATETIME, INTERVAL values
as strings 1-626S
syntax 1-624S
wildcards 1-626S
with LIKE in a condition 1-626S
Quotes, single Intro-7S
R
RAISE EXCEPTION statement
exiting a loop 12-26T
syntax 2-40S
Range rule 1-29S, 1-106S, 1-161S
Read Committed isolation level
1-479S
Read Committed isolation level
(ANSI) 7-13T
READ COMMITTED keywords,
syntax in SET TRANSACTION
1-476S
Read Uncommitted isolation level
1-478S
Read Uncommitted isolation level
(ANSI) 7-12T
READ UNCOMMITTED
keywords, syntax in SET
TRANSACTION 1-476S
REAL data type 3-23R
RECOVER TABLE statement
archiving a database with audit
trails 1-373S
manipulating audit trail file
1-375S
syntax 1-373S
Recursion, in a stored procedure
12-27T
Index
27
28
Release notes
Intro-8T, Intro-10R, Intro-12S
Remainder, in fragment
expressions 1-33S
Remote database server 11-9T
Remote shell 4-32R
RENAME COLUMN statement
restrictions 1-377S
syntax 1-376S
RENAME TABLE statement
ANSI-compliant naming 1-380S
syntax 1-379S
REPAIR TABLE statement, syntax
and use 1-382S
Repeatable Read isolation level
description of 1-464S, 1-479S
emulating during update 1-269S
Repeatable Read isolation level
(Informix and ANSI)
description of 7-15T
REPEATABLE READ keywords
syntax in SET ISOLATION 1-463S
syntax in SET TRANSACTION
1-476S
Replication of data 11-21T
Report generator 1-19T
Reserved words 1-593S
Resolution
in UPDATE STATISTICS
1-507S, 1-508S
with data distributions 1-507S
RESOURCE keyword
use in GRANT 1-307S
use in REVOKE 1-388S
Resource manager 11-13T
Resource privilege 10-7T, 1-307S
Restricting access, using file system
10-4T
Result of triggering statement
1-179S
RETURN statement
exiting a loop 12-26T
returning insufficient values 2-42S
returning null values 2-42S
syntax 2-42S
REVOKE statement
column-specific privileges 1-388S
database-level privileges 1-388S
granting privileges
10-6T to 10-15T
in embedded SQL 5-36T to 5-39T
privileges needed 1-385S
syntax 1-384S
table-level privileges 1-386S
with a view 10-30T
ROLLBACK WORK statement
cancels a transaction 4-26T
closes cursors 7-22T
releases locks 7-10T, 7-22T
sets SQLCODE 6-5T
syntax 1-391S
use with WHENEVER
1-68S, 1-76S, 1-392S
with DROP DATABASE 1-232S
with DROP INDEX statement
1-234S
with DROP PROCEDURE
statement 1-235S
with DROP SYNONYM
statement 1-236S
with DROP TABLE statement
1-239S
with DROP TRIGGER statement
1-240S
with DROP VIEW statement
1-242S
ROLLFORWARD DATABASE
statement
applies log to restored database
4-28T
exclusive locking 1-393S
syntax 1-393S
ROOT function
syntax in expression 1-560S
use in expression 1-564S
ROUND function
syntax in expression 1-560S
use in expression 1-564S
Round-robin distribution scheme
defined with ALTER
FRAGMENT 1-29S
Routine
DATETIME formatting 4-34R
Row
defined 2-5T
defining 8-22T
deleting 4-4T, 1-218S
description of 1-13T
engine response to locked row
1-468S
in relational model 1-13T, 8-22T
inserting 4-7T
through a view 1-321S
with a cursor 1-322S
multirow queries with FETCH
1-262S
order, guaranteeing
independence of 1-173S
phantom 1-464S, 1-478S
retrieving with FETCH 1-265S
rowid definition 1-265S
updating through a view 1-492S
writing buffered rows with
FLUSH 1-272S
ROW keyword
use in ALTER TABLE 1-65S
use in CREATE TABLE 1-163S
Row lock 7-9T
Rowid
adding
column with INIT clause 1-29S
to fragmented table with
CREATE TABLE 1-156S
to fragmented tables with
ALTER TABLE 1-65S
creating in a fragmented table
9-40T
description of 9-39T
dropping from fragmented tables
1-66S
dropping in a fragmented table
9-40T
in fragmented tables 9-40T
locating internal row numbers
3-17T
use in a column expression 1-550S
use in a join 3-16T
use in fragmented tables 1-29S
used as column name 1-599S
ROWID keyword 1-550S
Rule
arbitrary 1-30S, 1-107S, 1-161S
hash 1-30S, 1-107S, 1-161S
range 1-29S, 1-106S, 1-161S
Rules for stored procedures 1-185S
Run-time program
setting DBANSIWARN 4-19R
setting INFORMIXCOBDIR 4-41R
S
SCALE field
setting with SET DESCRIPTOR
1-453S
with GET DESCRIPTOR 1-282S
Schema. See Data Model.
Scroll cursor
active set 5-26T
definition of 5-24T, 1-208S
use of 1-208S
with FETCH 1-264S
SCROLL keyword
syntax in DECLARE 1-203S
use in DECLARE 5-24T, 1-208S
SE
temporary files 4-34R
SECOND keyword
syntax
in DATETIME data type 1-543S
in INTERVAL data type 1-610S
use
as DATETIME field qualifier
3-10R, 1-613S
as INTERVAL field qualifier
3-17R, 1-616S
Second normal form 8-33T
Secondary site 11-21T
Security
constraining inserted values
10-21T, 10-27T
database-level privileges 10-5T
making database inaccessible
10-5T
restricting access to columns
10-21T
restricting access to rows
10-21T, 10-22T
restricting access to view 10-28T
table-level privileges 10-11T
using host file system 10-4T
using operating system facilities
10-4T
with stored procedures 10-3T
Select
description of 1-14T
Select cursor
definition of 1-206S
opening 5-22T, 1-341S
reopening 1-344S
use of 5-21T, 1-207S
SELECT keyword
ambiguous use as procedure
variable 1-604S
syntax
in GRANT 1-308S
in REVOKE 1-386S
use
in GRANT 1-309S
in REVOKE 1-387S
Select list
display label 2-50T
expressions in 2-47T
functions in 2-53T to 2-66T
labels in 3-45T
selecting all columns 2-12T
selecting specific columns 2-18T
specifying a substring in 2-27T
Select privilege
column level 10-11T
definition of 10-9T, 1-309S
with a view 10-28T
SELECT statement
active set 2-29T
aggregate functions in
2-53T, 1-583S
alias names 2-79T
and COLLCHAR environment
variable 4-17R
and LC_COLLATE environment
variable 4-52R
and NLS collation order 1-17R
as an argument to a stored
procedure 2-6S
assigning values with 12-24T
associating with cursor with
DECLARE 1-207S
BETWEEN condition 1-412S
column numbers 1-426S
compound query 3-40T
cursor for 5-20T, 5-21T
date-oriented functions in 2-56T
Index
29
30
Index
31
SQLCA
warning when dbspace skipped
1-440S
sqlca record and EXECUTE
statement 1-246S
SQLCODE field
after opening cursor 5-21T
description of 5-12T
end of data on SELECT only 6-14T
end of data signalled 5-18T
set by DELETE 6-4T
set by DESCRIBE 5-34T
set by PUT, FLUSH 6-11T
sqlda structure
syntax
in DESCRIBE 1-222S
in FETCH 1-260S
in OPEN
1-247S, 1-251S, 1-340S, 1-36
5S
use
in DESCRIBE 1-223S
in FETCH 1-268S
in OPEN 1-346S
in PUT 1-369S
use with EXECUTE statement
1-247S
SQLERRD array
count of deleted rows 6-4T
count of inserted rows 6-11T
count of rows 6-14T
description of 5-13T
syntax of naming 5-12T
SQLERROR keyword, in the
WHENEVER statement 1-510S
SQLEXEC environment variable
4-64R
sqlexecd 11-15T
sqlhosts. See $INFORMIXDIR/etc/
sqlhosts.
SQLNOTFOUND
error conditions with EXECUTE
statement 1-249S
SQLRM environment variable
4-65R
SQLRMDIR environment variable
4-65R
32
SQLSTATE
in databases that are not ANSIcompliant 5-18T
list of codes 1-287S
use with a cursor 5-22T
SQLWARNING keyword, in the
WHENEVER statement 1-512S
SQRT function
syntax in expression 1-560S
use in expression 1-565S
Stacksize
setting INFORMIXSTACKSIZE
4-48R
START DATABASE statement
adding a transaction log 9-26T
syntax and use 1-482S
state table in stores7 database,
columns in 57
Statement
naming with NLS 1-17R
SQL
ANSI compliance and
DBANSIWARN 4-19R
CONNECT and
INFORMIXSERVER 4-47R
CREATE TABLE and
COLLCHAR 4-17R
DESCRIBE and COLLCHAR
4-17R
editing and DBEDIT 4-23R
LOAD and DBDELIMITER
4-23R, 4-38R
printing and DBPRINT 4-31R
SELECT and COLLCHAR 4-17R
SELECT and LC_COLLATE
4-52R
UNLOAD and DBDELIMITER
4-23R, 4-38R
UPDATE STATISTICS and
DBUPSPACE 4-37R
Statement identifier
associating with cursor 1-206S
definition of 1-352S
releasing 1-353S
syntax
in DECLARE 1-203S
in FREE 1-275S
use
in DECLARE 1-214S
in FREE 1-277S
in PREPARE 1-352S
Statement types 1-7S
Static SQL 5-5T
STATUS FOR keywords, in INFO
statement 1-318S
STATUS variable (4GL) 5-12T
Status, displaying with INFO
statement 1-318S
stock table in stores7 database,
columns in 55
STOP keyword, in the WHENEVER
statement 1-510S, 1-515S
Storage device 11-6T
Stored procedure
altering 12-15T
as triggered action 13-11T, 1-185S
branching 12-25T
BYTE and TEXT data types
2-11S, 2-16S
characteristics in sysprocedures
table 2-33R
checking references 1-185S
comments in 12-7T
creating from an embedded
language 12-6T
creating from DB-Access 12-6T
cursors with 2-24S
DBA-privileged, how to create
1-111S
DBA-privileged, use with triggers
12-16T, 1-186S
debugging 12-13T, 2-47S
default privileges 12-17T
DEFINE statement 12-20T
definition of 12-4T
displaying contents 12-10T
displaying documentation 12-11T
executing 12-11T
executing operating system
commands from 2-45S
general programming 1-20T
granting privileges on
10-13T, 12-17T, 12-18T,
1-311S
handling multiple rows 2-43S
header 12-28T, 2-11S
in SELECT statements
2-66T, 1-401S
in WHEN condition 1-179S
introduction to 12-3T
looping 12-26T
name confusion with SQL
functions 12-23T
naming output file for TRACE
statement 1-443S
owner-privileged
12-16T, 1-111S, 1-186S
privileges 1-186S
privileges necessary at execution
12-17T
program flow control 12-25T
receiving data from SELECT
1-403S
recursion 12-27T
REFERENCES clause 12-20T
returning values 12-28T
revoking privileges on
12-18T, 1-385S
security purposes 10-3T
sending mail from 2-46S
simulating errors 2-40S
tracing triggered actions 13-12T
use 12-4T
variable 12-19T
stored procedure
protected 2-33R
stores7 database
call_type table columns 56
catalog table columns 55
copying Intro-10T, Intro-12R,
Intro-14S
creating Intro-10T, Intro-12R,
Intro-14S
customer table columns 52
cust_calls table columns 56
data values 66
description of 51
items table columns 54
manufact table columns 57
map of 57
orders table columns 53
overview
Intro-9T, Intro-11R, Intro-13S
primary-foreign key relationships
59 to 66
Syntax diagram
elements of Intro-9S
syscolauth catalog table,
example 2-8R, 2-9R
syscolumns catalog table,
example 2-7R
sysdepend system catalog table
1-242S
sysindexes catalog table, example
2-10R
syssyntable system catalog table
11-19T
systabauth catalog table,
example 2-8R
systables catalog table,
example 2-5R
System catalog
accessing 2-11R
altering contents 2-11R
character column data type when
NLS activated 1-22R
database entries 1-95S
description of 2-3R
how used by database server 2-4R
list of tables 2-12R
map of tables 2-45R
NCHAR columns in 1-22R
privileges in 4-17T, 10-9T
querying 4-17T
sysblobs 2-13R
syschecks 2-14R
syscolauth 10-9T, 2-15R, 1-386S
syscoldepend 2-16R
syscolumns 2-17R
sysconstraints 2-20R
sysdefaults 2-22R
sysdepend 2-23R
sysdistrib 2-24R
sysfragments 2-25R
sysindexes 2-26R
sysopclstr 2-29R
sysprocauth 2-31R
sysprocbody 12-10T, 2-32R
sysprocedures 2-33R
sysprocplan 2-34R
sysreferences 2-35R
syssynonyms 2-36R
syssyntable 2-36R
Index
33
systabauth
4-17T, 10-9T, 2-38R, 1-312S,
1-386S
systables 2-39R
systrigbody 2-42R
systriggers 2-43R
sysusers 10-9T, 2-44R
sysviews 2-44R
updating statistics 2-11R
updating system catalog tables
2-11R
using 2-4R
System descriptor area 1-224S
assigning values to 1-449S
modifying contents 1-449S
resizing 1-449S
use with EXECUTE statement
1-248S
System name, in database name
1-537S
SYSTEM statement
syntax 2-45S
sysviews catalog table, example
2-8R
T
tabid, description of 2-6R
Table
adding a constraint 1-60S
alias in SELECT 1-408S
ANSI-compliant naming 1-637S
candidate keys, defined 8-25T
changing the data type of a
column 3-28R
checking with the CHECK TABLE
statement 1-69S
composite key, defined 8-25T
consumed 1-20S
creating 9-27T
a synonym for 1-125S
a table 1-129S
a temporary table 1-150S
defining columns 1-132S
defining fragmentation strategy
1-159S
defining temporary 1-153S
34
Table-level privilege
column-specific privileges
10-11T, 1-388S
default with GRANT 1-310S
definition and use 10-8T, 1-309S
granting 1-308S
passing grant ability 1-311S
revoking 1-386S
shown in tabauth table 2-8R
TABLES keyword, in INFO
statement 1-315S
tabtype 2-39R, 2-41R, 1-98S
TAN function
syntax in expression 1-577S
use in expression 1-578S
Tape management
setting ARC_DEFAULT 4-15R
setting ARC_KEYPAD 4-15R
setting DBREMOTECMD 4-32R
TEMP keyword
syntax in SELECT 1-395S
use in SELECT 1-429S
TEMP TABLE keywords, syntax in
CREATE TABLE 1-129S
Temporary
tables in SE, specifying directory
with DBTEMP 4-34R
tables, specifying dbspace with
DBSPACETEMP 4-33R
Temporary files
in OnLine, setting
DBSPACETEMP 4-33R
in SE, specifying directory with
DBTEMP 4-34R
setting PSORT_DBTEMP 4-62R
Temporary table
and active set of cursor 5-25T
assigning column names 3-13T
building distributions 1-509S
creating constraints for 1-153S
DBSPACETEMP environment
variable 1-151S
defining columns 1-153S
example 4-11T
explicit 1-150S
implicit 1-151S
naming 1-151S
storage
created with CREATE TABLE
1-151S
created with SELECT INTO
TEMP 1-429S
effects of DBSPACETEMP 4-33R
updating statistics 1-505S
when deleted 1-150S
TERM environment variable 4-66R
TERMCAP environment variable
11-16T, 4-66R
termcap file
and TERMCAP environment
variable 4-66R
Terminal handling
and TERM environment variable
4-66R
and TERMCAP environment
variable 4-66R
and TERMINFO environment
variable 4-67R
setting INFORMIXTERM 4-49R
terminfo directory
and TERMINFO environment
variable 4-67R
TERMINFO environment variable
4-67R
TEXT data type
description of 9-19T, 3-25R
inserting values 3-25R
nonprintable characters 3-26R
requirements for LOAD
statement 1-333S
restrictions
with aggregate functions 3-25R
with GROUP BY 3-6T, 3-25R
with IN clause 3-25R
with LIKE or MATCHES
2-39T, 3-25R
with ORDER BY 3-25R
with relational expression 2-30T
selecting a column 3-26R
syntax 1-540S
use in Boolean expression 3-25R
with control characters 3-25R
with LENGTH function 2-63T
with stored procedures
2-11S, 2-16S
logging 1-482S
recovering transactions 1-393S
rolling back 1-5R, 1-391S
starting with BEGIN WORK 1-67S
stopping logging 1-482S
transaction log 4-25T, 4-28T
transaction log required 9-25T
use signalled in SQLAWARN
5-13T
using cursors in 1-215S
Transaction logging
ANSI-compliant database, effects
1-13R
buffered 9-25T
contents of log 4-27T
effect on database server type
1-5R
establishing with CREATE
DATABASE 9-23T
OnLine methods of 9-25T
renaming log 1-483S
stopping 1-483S
turning off for faster loading
9-32T
turning off not possible 9-26T
Transaction manager 11-13T
Transfer of database files 5-23R
Transitive dependency 8-34T
Trigger
creating 13-4T
definition of 13-3T
effects on altered fragments 1-24S
effects with ALTER FRAGMENT
ATTACH 1-21S
in client/server environment
1-190S
information in systriggers table
2-43R
number on a table 1-166S
preventing overriding 1-189S
text in systrigbody table 2-42R
when to use 13-3T
Trigger event
definition of 13-5T, 1-166S
example of 13-5T
in CREATE TRIGGER statement
1-166S
INSERT 1-174S
privileges on 1-167S
Index
35
36
U
Unbuffered logging 9-25T
Underscore (_), wildcard in
Condition segment 1-524S
UNION operator
description of 3-40T
display labels with 3-45T
restrictions in view 10-23T
restrictions on use 1-432S
syntax in SELECT 1-395S
use in SELECT 1-431S
Unique constraint
dropping 1-63S
modifying a column with 1-58S
rules of use 1-61S, 1-140S, 1-144S
UNIQUE keyword
constraint in CREATE TABLE
9-27T
restrictions in modifiable view
10-25T
syntax
in CREATE INDEX 1-99S
in CREATE TABLE 1-136S
in SELECT 1-397S
use
in ALTER TABLE 1-60S
in CREATE INDEX 1-101S
in CREATE TABLE 1-138S
in expression 1-583S
in SELECT 2-19T, 1-399S
no effect in subquery 1-528S
Unique numeric code, with SERIAL
data type 3-23R
UNIQUE, synonym for DISTINCT
1-48S
UNITS keyword
syntax in expression 1-551S
use in expression 1-557S
UNIX
BSD
default print capability 4-31R
PATH environment variable
4-60R
specifying directories for
intermediate writes 4-62R
System V
default print capability 4-31R
terminfo library support 4-49R
TERM environment variable
4-66R
TERMCAP environment variable
4-66R
TERMINFO environment
variable 4-67R
viewing environment variable
settings 4-9R
UNIX environment variables 4-11R
UNIX operating system
11-5T, 11-7T
UNLOAD statement
DELIMITER clause 1-488S
exporting data to a file 9-30T
specifying field delimiter with
DBDELIMITER 4-23R
syntax 1-485S
UNLOAD TO file 1-486S
unloading VARCHAR, TEXT, or
BYTE columns 1-487S
UNLOAD TO file 1-486S
Unloading a database 5-10R
UNLOCK TABLE statement, syntax
and use 1-489S
Unnamed pipes 11-8T
with
Condition segment 1-517S
FETCH 1-269S
SET keyword 1-495S
WHERE CURRENT OF
keywords 1-500S
WHERE keyword 1-499S
with a select..for update 1-427S
with an update cursor 1-211S
UPDATE STATISTICS statement
and DBUPSPACE environment
variable 4-37R
and temporary tables 1-509S
creating data distributions 1-507S
dropping data distributions
1-507S
effect on sysdistrib table 2-24R
examining index pages 1-505S
optimizing search strategies
1-505S
syntax 1-502S
update system catalog 2-11R
using the LOW keyword 1-506S
when to execute 1-506S
Update trigger, defining multiple
1-169S
Upgrading the database server
1-506S
Upgrading to a newer database
server 1-506S
USER function
as affected by ANSI compliance
1-384S, 1-554S
syntax
in Condition segment 1-519S
in expression 1-551S
in INSERT 1-324S
use
in ALTER TABLE 1-45S
in CREATE TABLE 1-133S
in expression
2-62T, 2-63T, 3-19T, 1-553S
in INSERT 1-326S
User informix, privileges associated
with 1-307S
User privileges, described in
sysusers table 2-44R
Using correlation names 1-181S
V
VALUE clause
after NULL value is fetched
1-283S
relation to FETCH 1-282S
use in GET DESCRIPTOR 1-281S
use in SET DESCRIPTOR 1-450S
VALUES clause
effect with PUT 1-367S
syntax in INSERT 1-319S
use in INSERT 4-7T, 1-324S
Index
37
38
W
WAIT keyword, in the SET LOCK
MODE statement 1-467S
Warning
if dbspace is skipped 5-11T
if dbspace skipped 1-440S
WARNING keyword, in the
WHENEVER statement 1-510S
Warnings, with stored procedures
at compile time 12-9T
WEEKDAY function
as time function 2-56T, 2-59T
syntax in expression 1-573S
use in expression 1-575S
WHEN condition
in triggered action 1-178S
restrictions 1-179S
use of 1-178S
WHENEVER statement, syntax and
use 1-510S
WHERE clause, subscripting 2-45T
WHERE CURRENT OF keywords
impact on trigger 1-167S
syntax
in DELETE 1-218S
in UPDATE 1-491S
use
in DELETE 6-7T
in UPDATE 6-15T, 1-500S
WHERE keyword
Boolean expression in 2-37T
comparison condition 2-29T to ??
date-oriented functions in 2-59T
enforcing data constraints 10-28T
X
X/Open
and Informix implementation of
NLS 1-18R
Information Schema views 2-47R
setting NLS environment
variables 4-11R
setting the LC_COLLATE
category 4-51R
setting the LC_CTYPE category
4-53R
setting the LC_MONETARY
category 4-55R
setting the LC_NUMERIC
category 4-56R
setting the LC_TIME category
4-57R
specifications, icon for Intro-11S
X/Open mode
FETCH statement 1-263S
GET DESCRIPTOR 1-281S
SET DESCRIPTOR statement
1-451S
X/Open specification of NLS 1-18R
Y
YEAR function
as time function 2-56T
syntax in expression 1-573S
use in expression 1-575S
YEAR keyword
syntax
in DATETIME data type 1-543S
in INTERVAL data type 1-610S
use
as DATETIME field qualifier
3-10R, 1-613S
as INTERVAL field qualifier
3-17R, 1-616S
Symbols
$INFORMIXDIR/etc/sqlhosts
11-17T
%, percent sign, wildcard in
Condition segment 1-524S
( ), space, as delimiter
in DATETIME 3-11R
in INTERVAL 3-18R
*, asterisk
arithmetic operator 1-546S
use in SELECT 1-397S
+, plus sign, arithmetic operator
1-546S
-, hyphen, as delimiter
in DATETIME 3-11R
in INTERVAL 3-18R
-, minus sign, arithmetic operator
1-546S
. 1-111S
., decimal point, as delimiter
in DATETIME 3-11R
in INTERVAL 3-18R
..., ellipses, wildcard in Condition
segment 1-525S
/etc/hosts 11-17T
/etc/services 11-17T
/, division symbol, arithmetic
operator 1-546S
/, slash, arithmetic operator 1-546S
:, colon, as delimiter
in DATETIME 3-11R
in INTERVAL 3-18R
=, equals, relational operator
2-30T, 2-71T
?, question mark
as placeholder in PREPARE
5-31T, 1-352S
naming variables in PUT 1-368S
replacing with USING keyword
1-345S
wildcard in Condition segment
1-525S
@, at sign, in database name 1-535S
\, backslash, as escape character
with LIKE 1-524S
with MATCHES 1-525S
^, caret, wildcard in Condition
segment 1-525S
_, underscore, wildcard in
Condition segment 1-524S
||, concatenation operator 1-547S
Index
39
Reader-Response Card
Informix Guide to SQL: Reference, Version 7.1
Dear Reader,
At Informix Software, we think documentation is very important. After all, manuals are
an integral part of our product line. Because documentation is important, we want to know
what you think about our manuals. You can tell us by filling out and returning the ReaderResponse Card.
Thanks for your help!
1.
2.
3.
4.
5.
Very good
Good
Average
Poor
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Yes
No
Very good
Good
Average
Clarity:
Very clear
Average
Hard to understand
Poor
Level:
Too technical
Just right
Oversimplified
When you need to find information quickly, which part of the documentation
do you use?
Index:
Often
Sometimes
Rarely
Never
Table of Contents:
Often
Sometimes
Rarely
Never
Often
Sometimes
Rarely
Never
Chapter summaries:
Often
Sometimes
Rarely
Never
On-line help:
Often
Sometimes
Rarely
Never
Often
Sometimes
Rarely
Never
1-3
4-5
>5
1-3
4-5
>5
1-3
4-5
>5
6.
7.
8.
9.
10. Is the format of this manual easy to use? Consider page size, typeface, binding,
diagrams, and code examples.
11. Additional comments:
Company Name:
Your Name:
Address:
City:
State/Province:
Country:
Zip/Postal Code:
Telephone Number:
INFORMIX is a registered trademark of Informix Software, Inc.
To mail this card, please fold on the dotted line and staple or tape the open end.
NO POSTAGE
NECESSARY
IF MAILED
IN THE
UNITED STATES