PDA

View Full Version : Using Sub Selects


admin
05-30-2003, 07:46 AM
Using a Sub Select in your query can make your query more robust

Select * From table Where field = (Select Max(field) From table)

The trick is to only return a single field if you want to do an = something (an equajoin). Don't let the inner Select return multiple fields or multiple rows.