Help for this page

Select Code to Download


  1. or download this
    create table people (person_id integer not null primary key, surname v
    +archar(40) not null)
    
    ...
        FROM   people, town
        WHERE  people.person_id *= town.person_id
        AND    (town <> 'Washington' AND town IS NOT NULL)
    
  2. or download this
    surname                        town                                   
    +  
    ------------------------------ ---------------------------------------
    +- 
    ...
    Jones                          NULL
    Harry                          NULL
    Peanut                         Cairns
    
  3. or download this
        SELECT surname, town 
        FROM   people
        LEFT OUTER JOIN town 
            ON people.person_id = town.person_id
        WHERE (town <> 'Washington' AND town IS NOT NULL)
    
  4. or download this
    surname                                  town                         
    +            
    ---------------------------------------- -----------------------------
    +----------- 
    Smith                                    Bristol
    Peanut                                   Cairns