informix
Informix Guide to SQL: Syntax
Introduction

Documentation Conventions

This section describes the conventions that this manual uses. These conventions make it easier to gather information from this and other volumes in the documentation set.

The following conventions are discussed:

Typographical Conventions

This manual uses the following conventions to introduce new terms, illustrate screen displays, describe command syntax, and so forth.

Convention Meaning
KEYWORD All primary elements in a programming language statement (keywords) appear in uppercase letters in a serif font.
italics
italics
italics
Within text, new terms and emphasized words appear in italics. Within syntax and code examples, variable values that you are to specify appear in italics.
boldface
boldface
Names of program entities (such as classes, events, and tables), environment variables, file and pathnames, and interface elements (such as icons, menu items, and buttons) appear in boldface.
monospace
monospace
Information that the product displays and information that you enter appear in a monospace typeface.
Keystroke Keys that you are to press appear in uppercase letters in a sans serif font.
This symbol indicates the end of one or more product- or platform-specific paragraphs.
This symbol indicates a menu item. For example, "Choose Tools Options" means choose the Options item from the Tools menu.

Tip: When you are instructed to "enter" characters or to "execute" a command, immediately press RETURN after the entry. When you are instructed to "type" the text or to "press" other keys, no RETURN is required.

Icon Conventions

Throughout the documentation, you will find text that is identified by several different types of icons. This section describes these icons.

Comment Icons

Comment icons identify three types of information, as the following table describes. This information always appears in italics.

Icon Label Description
Warning: Identifies paragraphs that contain vital instructions, cautions, or critical information
Important: Identifies paragraphs that contain significant information about the feature or operation that is being described
Tip: Identifies paragraphs that offer additional details or shortcuts for the functionality that is being described

Feature, Product, and Platform Icons

Feature, product, and platform icons identify paragraphs that contain feature-specific, product-specific, or platform-specific information.

Icon Description
Identifies information or syntax that is specific to Informix Enterprise Decision Server
Identifies information that is specific to C user-defined routines (UDRs)
Identifies information that is specific to DB-Access
Identifies information that is specific to Informix ESQL/C
Identifies information that is specific to external routines, that is, UDRs written in both C and Java.
Identifies information that relates to the Informix Global Language Support (GLS) feature
Identifies information that is specific to Informix Dynamic Server 2000
Identifies information that is specific to UDRs written in Java
Identifies information that is specific to SQL Editor, which is a component of Informix Enterprise Command Center for Dynamic Server
Identifies information that is specific to UNIX platforms
Identifies information that is specific to the Windows NT environment

These icons can apply to an entire section or to one or more paragraphs within a section. If an icon appears next to a section heading, the information that applies to the indicated feature, product, or platform ends at the next heading at the same or higher level. A symbol indicates the end of feature-, product-, or platform-specific information that appears in one or more paragraphs within a section.

Compliance Icons

Compliance icons indicate paragraphs that provide guidelines for complying with a standard.

Icon Description
Identifies information that is specific to an ANSI-compliant database
Identifies functionality that conforms to X/Open
Identifies information or syntax that is an Informix extension to ANSI SQL-92 entry-level standard SQL

These icons can apply to an entire section or to one or more paragraphs within a section. If an icon appears next to a section heading, the information that applies to the indicated feature, product, or platform ends at the next heading at the same or higher level. A symbol indicates the end of feature-, product-, or platform-specific information that appears within one or more paragraphs within a section.

Syntax Conventions

This section describes conventions for syntax diagrams. Each diagram displays the sequences of required and optional keywords, terms, and symbols that are valid in a given statement or segment, as Figure 1 shows.

Figure 1
Example of a Simple Syntax Diagram

Each syntax diagram begins at the upper-left corner and ends at the upper-right corner with a vertical terminator. Between these points, any path that does not stop or reverse direction describes a possible form of the statement.

Syntax elements in a path represent terms, keywords, symbols, and segments that can appear in your statement. The path always approaches elements from the left and continues to the right, except in the case of separators in loops. For separators in loops, the path approaches counterclockwise. Unless otherwise noted, at least one blank character separates syntax elements.

Elements That Can Appear on the Path

You might encounter one or more of the following elements on a path.

Element Description
KEYWORD A word in UPPERCASE letters is a keyword. You must spell the word exactly as shown; however, you can use either uppercase or lowercase letters.
( . , ; @ + * - / ) Punctuation and other nonalphanumeric characters are literal symbols that you must enter exactly as shown.
' ' Single quotes are literal symbols that you must enter as shown.
variable A word in italics represents a value that you must supply. A table immediately following the diagram explains the value.
A reference in a box represents a subdiagram. Imagine that the subdiagram is spliced into the main diagram at this point. When a page number is not specified, the subdiagram appears on the same page.
A reference in a box in the upper-right corner of a subdiagram refers to the next higher-level diagram of which this subdiagram is a member.
An icon is a warning that this path is valid only for some products, or only under certain conditions. Characters on the icons indicate what products or conditions support the path.
These icons might appear in a syntax diagram:
This path is valid only for Enterprise Decision Server.
This path is valid only for C user-defined routines (UDRs).
This path is valid only for DB-Access.
This path is valid only for Informix ESQL/C.
This path is valid only for external routines, that is, UDRs written in C and Java.
This path is recommended only if you use a nondefault locale.
This path is valid only for UDRs written in Java.
This path is valid only for Dynamic Server.
This path is valid only if you are using Informix Stored Procedure Language (SPL).
This path is an Informix extension to ANSI SQL-92 entry-level standard SQL. If you initiate Informix extension checking and include this syntax branch, you receive a warning. If you have set the DBANSIWARN environment variable at compile time, or have used the -ansi compile flag, you receive warnings at compile time. If you have DBANSIWARN set at runtime, or if you compiled with the -ansi flag, warning flags are set in the sqlwarn structure. The Informix extension warnings tend to be conservative. Sometimes the warnings appear even when a syntax path conforms to the ANSI standard.
A shaded option is the default action.
Syntax within a pair of arrows is a subdiagram.
The vertical line terminates the syntax diagram.
A branch below the main path indicates an optional path. (Any term on the main path is required, unless a branch can circumvent it.)
A set of multiple branches indicates that a choice among more than two different paths is available.
A loop indicates a path that you can repeat. Punctuation along the top of the loop indicates the separator symbol for list items. If no symbol appears, a blank space is the separator.
A gate ( ) on a path indicates that you can only use that path the indicated number of times, even if it is part of a larger loop. You can specify size no more than three times within this statement segment.

How to Read a Syntax Diagram

Figure 2 shows a syntax diagram that uses most of the path elements that the previous table lists.

Figure 2
Example of a Syntax Diagram

To use this diagram to construct a statement, start at the top left with the keyword DELETE FROM. Follow the diagram to the right, proceeding through the options that you want.

Figure 2 illustrates the following steps:

  1. Type DELETE FROM.
  2. You can delete a table, view, or synonym:
  3. Follow the diagram to the terminator.
  4. Your DELETE statement is complete.

Sample-Code Conventions

Examples of SQL code occur throughout this manual. Except where noted, the code is not specific to any single Informix application development tool. If only SQL statements are listed in the example, they are not delimited by semicolons. For instance, you might see the code in the following example:

To use this SQL code for a specific product, you must apply the syntax rules for that product. For example, if you are using DB-Access, you must delimit multiple statements with semicolons. If you are using an SQL API, you must use EXEC SQL at the start of each statement and a semicolon (or other appropriate delimiter) at the end of the statement.

Tip: Ellipsis points in a code example indicate that more code would be added in a full application, but it is not necessary to show it to describe the concept being discussed.

For detailed directions on using SQL statements for a particular application development tool or SQL API, see the manual for your product.


Informix Guide to SQL: Syntax, Version 9.2
Copyright © 1999, Informix Software, Inc. All rights reserved