On 19 Aug 2003 at 13:17, Jack Lauman wrote:

> I have two tables, contact_account and contact.
> 
> contact_account has two fields: contact_id (pk) and account_id
> 
> contact has a PK of contact_id
> 
> I to select all the columns in contact where account_id=13
> 
> I tried:
> 
> SELECT * FROM (contacts INNER JOIN account on contact.contact_id =
> account.account_id) WHERE account.account_id = 13;

If you want help, you need to provide the exact queries you're using 
(copied and pasted, not retyped) and the exact error messages you're 
getting.  If you're not getting an error message, say what result you 
got and how it differs from what you expected.

In this case, you keep changing the names of your tables (contact/
contacts, contact_account/account), so we can't know whether that's 
the problem or just a distraction.  Also, you're joining on 
contact_id in one table and account_id in the other; presumably you 
want contact_id in both.


-- 
Keith C. Ivey <[EMAIL PROTECTED]>
Tobacco Documents Online
http://tobaccodocuments.org


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

Reply via email to