next up previous
Next: The where Clause Up: Basic Structure Previous: Basic Structure

The select Clause

  1. An example: Find the names of all branches in the account relation.

     select bname
    

    from account

  2. distinct vs. all: elimination or not elimination of duplicates.

    Find the names of all branches in the account relation.

     select distinct bname
    

    from account

    By default, duplicates are not removed. We can state it explicitly using all.

     select all bname
    

    from account

  3. select * means select all the attributes. Arithmetic operations can also be in the selection list.


Osmar Zaiane
Fri May 22 19:39:12 PDT 1998