* Jack Lauman 
> 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;

SELECT * FROM contacts 
  INNER JOIN account ON 
    contact.contact_id = account.contact_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.

See the SELECT ... INTO OUTFILE:

<URL: http://www.mysql.com/doc/en/SELECT.html >

-- 
Roger

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

Reply via email to