List:General Discussion« Previous MessageNext Message »
From:Jay J Date:December 30 1999 9:55am
Subject:Re: anything wrong with this code ?
View as plain text  
----- Original Message -----
From: "Santosh Shotemba" <santosh@stripped>
To: "mysql" <mysql@stripped>
Sent: Thursday, December 30, 1999 12:01 AM
Subject: anything wrong with this code ?


> Hi folks,
>
> select cust_id from c_user where company_id = "(select company_id from
> c_user where cust_id ='123456')";
>
>
> select cust_id from c_user where company_id = "(select a.company_id from
> c_user a where a.cust_id ='123456')";
>
> both of these statements are returning empty set. can anyone tell me where
i
> went wrong ?
>
> thanks for your help.
> santosh.

Unless you're running >= 3.23, MySQL doesn't support sub-selects. So, with
the quotes, you're literally asking for "(select a....."

-Jay J

Thread
anything wrong with this code ?Santosh Shotemba30 Dec
  • Re: anything wrong with this code ?Sasha Pachev30 Dec
  • Re: anything wrong with this code ?Jay J30 Dec