Let me see if I understood your question:
"select * from tablename a, tablename2 b where a.account='BILL' and
a.account=b.account"
It's tow tables or just one table?
because if it's just one table just do "select * from tablename where
account='BILL'"
see you,
Augusto
On Sat, 9 Jun 2001, Jaime Teng wrote:
> 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
>
---------------------------------------------------------------------
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