I use MySql, when running below query, I find it acts differently in two box, could any one help me out?
The code is here:
SELECT *
FROM `product` AS `e`
WHERE e.id NOT IN((SELECT `product_id` FROM `sales`))
In one box, it works well and returns the result. In the other box, it shows the error:
[Err] 1242 - Subquery returns more than 1 row
And it works well in both box if remove one pair of (), as below:
SELECT *
FROM `product` AS `e`
WHERE e.id NOT IN(SELECT `product_id` FROM `sales`)
Could anyone tell me the reason, i.e. related to server setting? Can I fix this without modify the sql statements?