sql单个字段分组得到所有列
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
select * from LYHG_News_Message,(select NewsID,max(Insert_time) as maxTime from LYHG_News_Message group by newsID) as maxTimeMsg
where maxTimeMsg.newsID=LYHG_News_Message.newsID and maxTimeMsg.maxtime=LYHG_News_Message.insert_time
where maxTimeMsg.newsID=LYHG_News_Message.newsID and maxTimeMsg.maxtime=LYHG_News_Message.insert_time