On Feb 6, 2008 6:40 AM, Britske <[EMAIL PROTECTED]> wrote:
> SELECT * FROM prices WHERE prices.productid IN (SELECT id FROM priducts
> ORDER BY id LIMIT 0, 1000)
>
> However, I'm getting an error-message stating that Limit is not allowed in a
> subquery.
> How would you approach this?

SELECT *
FROM prices
JOIN (SELECT id FROM products ORDER BY id LIMIT 0, 1000) AS products
ON (prices.productid = products.id)

- Perrin

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

Reply via email to