-
-
mysql group by 组内排序
下面有两种方法可以实现:
(1)
selet tt.id,tt.newsID,tt.comment,tt.theTime from(
select id,newsID,comment,theTime from comments order by theTime desc) as tt group by newsID
(2)
select id,newsID,comment,theTime from comments as tt group by id,newsID,comment,theTime having
theTime=(select max(the...
2014/12/12
mysql
9,991
7
3
-
-