本文共 283 字,大约阅读时间需要 1 分钟。
(1)mysql limit 不支持子查询像下面这条语句无法执行 SELECT * FROM b_c_s1 where CT_ID IN (SELECT DISTINCT CT_ID FROM b_c_s1 LIMIT 0,2); (2)应该在只查询外面再加一个查询 SELECT * FROM b_c_s1 where CT_ID IN (SELECT a.CT_ID FROM (SELECT DISTINCT CT_ID FROM b_c_s1 LIMIT 0,2) a) 转载于:https://my.oschina.net/clks/blog/179317