(1)mysql limit 不支持子查询像下面这条语句无法执行
[b]SELECT * FROM b_c_s1 where CT_ID IN (SELECT DISTINCT CT_ID FROM b_c_s1 LIMIT 0,2);[/b]
(2)应该在只查询外面再加一个查询
[b]SELECT * FROM b_c_s1 where CT_ID IN ([color=red]SELECT a.CT_ID FROM (SELECT DISTINCT CT_ID FROM b_c_s1 LIMIT 0,2) a[/color])[/b]
[b]SELECT * FROM b_c_s1 where CT_ID IN (SELECT DISTINCT CT_ID FROM b_c_s1 LIMIT 0,2);[/b]
(2)应该在只查询外面再加一个查询
[b]SELECT * FROM b_c_s1 where CT_ID IN ([color=red]SELECT a.CT_ID FROM (SELECT DISTINCT CT_ID FROM b_c_s1 LIMIT 0,2) a[/color])[/b]