informix
Informix Guide to SQL: Tutorial
Composing SELECT Statements

Composing SELECT Statements

In This Chapter
Introducing the SELECT Statement
Some Basic Concepts
Privileges
Relational Operations
Selection and Projection
Joining
The Forms of SELECT
Special Data Types
Single-Table SELECT Statements
Selecting All Columns and Rows
Using the Asterisk Symbol (*)
Reordering the Columns
Sorting the Rows
Selecting Specific Columns
Selecting Substrings
ORDER BY and Non-English Data
Using the WHERE Clause
Creating a Comparison Condition
Including Rows
Excluding Rows
Specifying A Range of Rows
Excluding a Range of Rows
Using a WHERE Clause to Find a Subset of Values
Identifying Null Values
Forming Compound Conditions
Using Exact-Text Comparisons
Using Variable-Text Searches
Using a Single-Character Wildcard
MATCHES and Non-English Data
Protecting Special Characters
Using Subscripting in a WHERE Clause
Using a FIRST Clause to Select Specific Rows
FIRST Clause Without an ORDER BY Clause
FIRST Clause with an ORDER BY Clause
FIRST Clause in a Union Query
Expressions and Derived Values
Arithmetic Expressions
CASE Expressions
Sorting on Derived Columns
Using Rowid Values In SELECT Statements
Using Rowid Values with the USER Function
Using Rowid Values with the DBSERVERNAME Function
Multiple-Table SELECT Statements
Creating a Cartesian Product
Creating a Join
Equi-Join
Natural Join
Multiple-Table Join
Some Query Shortcuts
Using Aliases
The INTO TEMP Clause
Selecting Tables from a Database Other Than the Current Database
Summary

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