Page 1 of 1
Quicker search
Posted: Sat Mar 06, 2004 7:00 am
by gld4x4

I have a database that has tables in it state, county, practice etc..
When I do a search I search by the above the request has to search through all the records in the database. Is there anyway I can I can do a search so it will only look at the records for that state?
Thanks
Posted: Sun Mar 07, 2004 12:53 pm
by JAM
Not following, is this different tables, or different fields?
If fields:
Code: Select all
select * from table where state = 'alabama'
If tables (kinda):
Code: Select all
select practice.* from practice inner join state on state.name = practise.state where state.name = 'alabama'
The later depends on what fields you are using aso aso...