select * from goods a where
(select count(id) from goods b where b.c_id=a.c_id and b.id>a.id) <3
sql取出商品表每个类别的前3条记录
2016-08-21 18:02
2016-08-21 18:02
select * from goods a where
(select count(id) from goods b where b.c_id=a.c_id and b.id>a.id) <3