Informix Guide to SQL: Syntax
Chapter 1: SQL Statements
Home
Contents
Index
Master Index
New Book
Segments
Segments are language elements, such as table names and expressions, that occur repeatedly in the syntax diagrams for
SQL and SPL
statements. These language elements are discussed separately in this section for the sake of clarity, ease of use, and comprehensive treatment.
Whenever a segment occurs within the syntax diagram for an
SQL
or
SPL
statement, the diagram references the description of the segment in this section.
Scope of Segment Descriptions
The description of each segment includes the following information:
A brief introduction that explains the purpose of the segment
A syntax diagram that shows how to enter the segment correctly
A syntax table that explains each input parameter in the syntax diagram
Rules of usage, including examples that illustrate these rules
If a segment consists of multiple parts, the segment description provides the same set of information for each part. Each segment description concludes with references to related information in this manual and other manuals.
Use of Segment Descriptions
The syntax diagram within each segment description is not a standalone diagram. Instead it is a subdiagram that is subordinate to the syntax diagram for an
SQL
or
SPL
statement. A reference box in the syntax diagram for the statement refers to this subdiagram by providing the name of the segment and the page number on which the segment description begins.
First look up the syntax for the statement, and then turn to the segment description to find out the complete syntax for the segment. You will probably never need to look up the segment first and then work backward to a statement or statements that contain the segment.
For example, if you are using INFORMIX-Universal Server, and you want to enter a
CREATE VIEW
statement that includes a database name and database server name in the view name, first look up the syntax diagram for the
CREATE VIEW
statement. Then use the reference box for the View Name segment in that syntax diagram to look up the subdiagram for the View Name segment.
The subdiagram for the View Name segment shows you how to qualify the simple name of a view with the name of the database or with the name of both the database and the database server. Use the syntax in the subdiagram to enter a
CREATE VIEW
statement that includes the database name and database server name in the view name. The following example creates the
name_only
view in the
sales
database on the
boston
database server:
CREATE VIEW sales@boston:name_only AS
SELECT customer_num, fname, lname FROM customer
Segments in This Section
This section describes the following segments:
Argument
Collection Derived Table
Condition
Constraint Name
Database Name
Data Type
DATETIME
Field Qualifier
Expression
External Routine Reference
Function Name
Identifier
Index Name
INTERVAL
Field Qualifier
Literal Collection
Literal
DATETIME
Literal
INTERVAL
Literal Number
Literal Row
Procedure Name
Quoted Pathname
Quoted String
Relational Operator
Return Clause
Routine Modifier
Routine Parameter List
Specific Name
Statement Block
Synonym Name
Table Name
View Name
Informix Guide to SQL: Syntax
, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.