Entry
Like to know how to sort data for a column over multiple tables ?
Jul 2nd, 2001 07:39
Jonathan Sharp, Kim Siong,
If you have the following tables:
a: id, fname, lname, email, bid
b: id, address, city, state, zip
and you want to join the tables on a.bid=>b.id you would run a query
and use the ORDER BY statement for a column that you select...
SELECT * FROM a, b WHERE a.bid=b.id ORDER BY state DESC
This will return a result set ordered by state in descending order. To
retrieve it in ascending order just drop the DESC.