Mimer SQL User's Manual TOC PREV NEXT INDEX

Mimer Developer Site

www.mimer.com/developer


Simple Retrieval


The simplest retrievals fetch information from one table.

The general form of the simple SELECT statement is:

 SELECT column-list FROM table [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.

Examples of Simple Retrieval

To find the name and city for all hotels.
 SELECT  NAME,CITY
 FROM    HOTEL;
Result:

  NAME        
 CITY         
  LAPONIA     
 STOCKHOLM    
  SKYLINE     
 UPPSALA      
  ST. GEORGE  
 STOCKHOLM    
  Winston 
 London
  WINSTON     
 COPENHAGEN   
  WINSTON     
 GOTHENBURG   

To find the name and city for hotels in Stockholm:
 SELECT  NAME,CITY
 FROM    HOTEL
 WHERE   CITY='STOCKHOLM';
Result:

  NAME        
 CITY         
  LAPONIA     
 STOCKHOLM    
  ST. GEORGE  
 STOCKHOLM    

The formulation of selection conditions is described in detail in Selecting Specific Rows.



Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
dbtechnology@upright.se
Mimer SQL User's Manual TOC PREV NEXT INDEX