Try

SELECT * FROM contact INNER JOIN contact_account ON contact.contact_id=contact_account.contact_id WHERE contact_account.account_id = 13



At 04:17 PM 8/19/2003, 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;

One I get the query to work right I neet to write it to a file in CSV
format.

Any help would be appreciated.

Thanks,

Jack


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


Patrick J. Shoaf, Systems Engineer
<mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]

Midmon Internet Services, LLC
100 Third Street
Charleroi, PA 15022
http://www.midmon.com
Phone: 724-483-2400 ext. 105
 or    888-638-6963
Fax:   724-489-4386



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



Reply via email to