运行此查询时,我收到以下错误,我不明白。我现在已加入行,是否存在某些我应该知道的限制或者我是否缺少简单错误?这是错误:
#1235 - This version of MySQL doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
这是我想要运行的查询:
SELECT t.*
FROM tasks t
LEFT JOIN users u ON u.user_id = 1
WHERE task_id = '677'
AND createdby IN(
(SELECT u1.user_id FROM users u1 WHERE u1.user_team = u.user_team
AND taskrspnsble IN(
(SELECT u2.user_id FROM users u2 WHERE u2.user_role <= u.user_role)
))
)
答案 0 :(得分:0)
由于萨蒂的回答,我想出来了:
SELECT t.*
FROM tasks t
LEFT JOIN users u ON u.user_id = 1
WHERE task_id = '677'
AND createdby IN(
(SELECT u1.user_id FROM users u1 WHERE u1.user_team = u.user_team
AND taskrspnsble IN(
(SELECT u2.user_id FROM users u2 WHERE u2.user_role <= u.user_role)
))
)