in reply to OT: Generalizing SQL Select statements
You may want to look into PostgreSQL which is as far as I know far superior to MySQL.
metadoktor
"The doktor is in."