获取列表中各个分类的第一条数据

select * from TypeTable where id in(select min(Type_id) from newsList group by Type_id)

  其中  TypeTable 为分类列表, newsList 为新闻列表

posted @ 2017-11-17 11:02  rohua  阅读(536)  评论(0)    收藏  举报