[thelist] addressbook table design [sql]

Russell Griechen russgri at bellsouth.net
Tue Feb 11 08:22:01 CST 2003


Here is a basic call and table that may help you structure...
"Give me all of the records in my AddressBook database where the value in
the State field is "California", the Age of the person is greater than 18,
and the PhoneNumber field is not blank. Show me just the FirstName,
LastName, City, and PhoneNumber fields, and sort the records in ascending
order by ZipCode."
Here is the "SQL Statement" for that request:

SELECT FirstName, LastName, City, PhoneNumber FROM AddressBook WHERE State =
'California' AND Age > 18 AND PhoneNumber <> '', ORDER BY ZipCode

The database does the rest!

Russell Griechen




More information about the thelist mailing list