[thelist] MYSQL MULTIPLE TABLES SELECT QUESTION

Tris beertastic at gmail.com
Wed Jul 25 09:47:44 CDT 2007


You should, if you can, re-structure your table, to use ONE table, and
add a 'type' field?

Then you can do s simple query without a join..
however, I'm sure rudy will swoop in and save the day any sec now...

Let us know if that's not an option..

Tris...


On 25/07/07, Onyango, Felix <Felix.Onyango at fnf.com> wrote:
> Guys, I am somewhat a newbie is MySQL, what I have is several tables
> containing products offered by different manufactures. All tables have
> identical structures.
>
> What I want to do is to construct a query that will search all the
> tables for a particular column and return ALL (*) data if that column
> matches.
>
> Here is an example of what I am taking about
>
> Table 1 = Dickies
>
> Table 2 = Levi
>
>
>
> ALL Tables Structure: Gender,Name,P_ID,Color,G_ID,Qty
>
>
>
> "  SELECT * FROM Dickies, levi WHERE Dickies.Gender='F' AND
> Levi.Gender='F'   "
>
>
>
> I been on Google and have read all sorts of documentation but yet to
> find any information on how to construct this query - Maybe I am looking
> for the wrong information. I did however find a lot of documentation
> about using the JOIN statement,  - Could this be the answer? If yes, how
> do I go about it.
>
>
>
> Felix Onyango
>
> Systems Admin
>
>
>
> --
>
> * * Please support the community that supports you.  * *
> http://evolt.org/help_support_evolt/
>
> For unsubscribe and other options, including the Tip Harvester
> and archives of thelist go to: http://lists.evolt.org
> Workers of the Web, evolt !
>


-- 
`We are what we pretend to be, so we must be careful what we pretend to be.`
Kurt Vonnegut

`When a person can no longer laugh at himself, it is time for others
to laugh at him.`
Thomas Szasz



More information about the thelist mailing list