Mimer SQL Documentation TOC PREV NEXT INDEX

Mimer SQL Developer Site


Simple Retrieval


The simplest retrievals fetch information from one table.

The general form of the simple SELECT statement is:

 SELECT column-list FROM table_name WHERE condition;
 

The column-list specifies which columns to select, and the WHERE condition determines which rows to select. If no WHERE condition is specified, all rows are retrieved from the source table or view.

Examples of Simple Retrieval

Find the format identifiers and their meaning:
 SELECT format_id, format
    FROM formats;
Returns:

FORMAT_ID
 FORMAT
1
 Audio CD
2
 Cassette
3
 DVD Audio
4
 Vinyl
5
 Audio Cassette
6
 Audio CD
7
 Hardcover
8
 Paperback
9
 DVD Video
10
 Video

Find the name and code for all countries that use Australian dollars (AUD).
 SELECT country, code
    FROM countries
    WHERE currency_code = 'AUD';
Returns:
 COUNTRY
 CODE
 Australia
 AU
 Cocos (Keeling) Islands
 CC
 Christmas Island
 CX
 Heard and McDonald Islands
 HM
 Kiribati
 KI
 Norfolk Island
 NF
 Nauru
 NR
 Tuvalu
 TV

How to formulate selection conditions is described in detail in Selecting Specific Rows.


Mimer
Mimer Information Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
info@mimer.se
Mimer SQL Documentation TOC PREV NEXT INDEX