Problem with LIMIT & IN/ALL/ANY/SOME subquery

后端 未结 4 1671
予麋鹿
予麋鹿 2020-12-06 01:50

I have this query:

SELECT count(cp.CxID) as intSmokers 
FROM CustPrimarySmoking cp 
JOIN Customer c ON cp.CxID = c.CustomerID 
WHERE 
cp.CxID IN (SELECT CxID         


        
4条回答
  •  北荒
    北荒 (楼主)
    2020-12-06 02:19

    You can also double-nest the inner query to get around this restriction, see:

    Mysql delete statement with limit

提交回复
热议问题