0

I had to normalize my db as it was so intense that couldn't get required search results. Now I have 10 tables and I am looking around some way that if visiter inputs query that matches with any one of 10 tables, data should be requested from that one (Anyways I have normalized it the way that query cannot be from multiple tables)

I tried:

("SELECT * FROM tb1, tb2, tb3, tb4... WHERE vbc LIKE..

That doesn't seem to work, And I guess UNION/JOINS are not worth as I want to fetch data fron either of the table. Look forward for your suggestion. Thanks.

What I have:

Table1

id  planet  areas
1   Earth   USA
2   Earth   Canada
3   Earth   Mexico
4   Earth   UK

Table2

id  Area    Flowers
1   USA     Roses
2   USA     Lily
3   USA     Lotus
4   USA     Alyssum

If only use table1, and enter 'Earth' in search I get all name of countries and if I enter 'USA' I get USA in result.. And thats what I want.. But can't seem to do it with multiple tables..

Sandy
  • 3
  • 2

0 Answers0