3 messages in com.mysql.lists.mysqlMulti-Table SELECT Query
FromSent OnAttachments
mys...@ibest.com.br19 Jul 2002 12:03 
mys...@ibest.com.br19 Jul 2002 12:05 
mys...@ibest.com.br19 Jul 2002 12:06 
Subject:Multi-Table SELECT Query
From:mys...@ibest.com.br (mys@ibest.com.br)
Date:07/19/2002 12:03:57 PM
List:com.mysql.lists.mysql

Hi...

I'm beginner MySQL user.

I'm using MySQL 3.23.49a on Linux 2.4.18 with MyODBC 3.51 driver....

I have 3 tables named 'Products', 'Categories' and 'Suplies'. In the 'Products' table, exists two foreign keys for both 'Categorys' and 'Suplies' tables. I need run a Query that return one row only with the follow columns (ProductName,CategoryID, SuplieID,CategoryName,SuplieName), and i have the ProductID only.

Solution 1: Three independent query's.

Solution 2: One query only, using WHERE clause on foreign keys...

What's the best solution (performance) ?

Thanks Regards, Marcel-Brazil

iBEST - Acesso grátis à internet com alta qualidade de conexão. Experimente agora: baixe o Ultradiscador* iBEST em www.ibest.com.br