UVM Logo
The
University
of
Vermont



SQL Basics 


The basic SQL command is:

SELECT column_a, column_b
FROM table_1, table_2
WHERE (join condition)
and (other filtering conditions)
ORDER BY column_c, column_d

Single table example:

SELECT spriden_pidm 
FROM spriden
WHERE spriden_last_name = 'Kennedy'
and spriden_first_name = 'Keith'
and spriden_change_ind is null;

Two table example:

SELECT spriden_first_name, spriden_last_name, spraddr_city
FROM spriden, spraddr
WHERE spriden_pidm = spraddr_pidm
and spriden_change_ind is null
ORDER BY spriden_last_name, spriden_first_name; 

 

Copyright 1995 University of Vermont and others. All rights reserved.
Brought to you through the courtesy of Computing and Information Technology, University of Vermont. Copyright © 1996 The University of Vermont and others. All rights reserved.

The University supports both institutional and personal web pages. The views expressed on personal web pages are strictly those of the author, and are not reviewed or approved by the University of Vermont

Read the Webmaster's Policies.

Send questions and comments to keith.kennedy@uvm.edu

Last page update: March 21, 1997