Hi

How do I perform this query using one operation?

SELECT * FROM tablename WHERE account = (select account from tablename
where name='BILL');

What I want is to lists all entries who's account is the same with 'BILL'.
Thus far, what I know is to extract the account of 'BILL' and then
perform another select of entries with the same account.

I already tried:
select * from user u, user r where r.account=u.account and r.name='BILL';

i got no result but no error.

jaime



database,sql


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to