Hi Fongo,

http://www.mysql.com/doc/en/JOIN.html


Should work like this (untested):

 SELECT Customers.Name, Customers.City, Orders.Product, Order.Price from
 Customers, Orders WHERE Customers.cust_id = Orders.cust_id AND
 cust_id = 2 inner join 


Best regards

Nils Valentin
Tokyo/Japan


2003年 8月 15日 金曜日 16:44、B. Fongo さんは書きました:
> Hello!
>
> I ' m trying to extra some information from 2 tables using inner join,
> but receive an error warning.  Am newbie so I' m not able to feature out
> why my queries don't work.
>
> Scenario:
>
> I have 2 tables: Customers and orders. The have following structures:
> Customers                             Orders
> cust_id                       Product
>  Name                         Price
>  City                         cust_id
>
>
> All that am trying to get out of these tables is to use a cust_id of a
> given customer to extract their orders. So I use something like this:
>
> SELECT Customers.Name, Customers.City, Orders.Product, Order.Price from
> Customers WHERE cust_id = 2 inner join Orders ON Customers.cust_id =
> Orders.cust_id
>
> Can anyone help me on this?
>
> Thanks

-- 
---
Valentin Nils
Internet Technology

 E-Mail: [EMAIL PROTECTED]
 URL: http://www.knowd.co.jp
 Personal URL: http://www.knowd.co.jp/staff/nils


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to