1

我正在尝试将 MS Access 查询转换为 MySQL,问题是将 MS Access 转换top为 MySQLlimit以获得相同的结果。当我将查询更改为时,我收到此版本的 MySQL在子查询limit中不支持的错误。limit

这是 MS Access 查询:

SELECT  a.FK_CONTRIBUTOR_ID
FROM tPUBLISHERS 
INNER JOIN (tCONTRIBUTORS AS b 
    INNER JOIN tCLIPS AS a ON b.CONTRIBUTOR_ID = a.FK_CONTRIBUTOR_ID) 
    ON tPUBLISHERS.PUBLISHER_ID = b.FK_PUBLISHER_ID
WHERE ((a.CLIP_ID) In 
    (select top 5 CLIP_ID 
     from tCLIPS 
     where FK_CONTRIBUTOR_ID = a.FK_CONTRIBUTOR_ID 
         AND SUSPEND = a.SUSPEND)) 
    AND ((a.FK_CONTRIBUTOR_ID) In (1922,2034,2099))
4

1 回答 1

0

先前回答于: MySQL 子查询限制

基本上将子查询更改为 Join

谷歌更多关于“子查询的mysql限制”

于 2013-10-17T16:49:03.877 回答