select distinct


select distinct vst_small_id, upload_day + ' '+ upload_time from vst_small order by upload_day desc,upload_time desc;
服务器: 消息 145,级别 15,状态 1,行 1
如果指定了 SELECT DISTINCT,那么 ORDER BY 子句中的项就必须出现在选择列表中。

拆开写就好了,比较一下这两条语句的异同
select distinct vst_small_id, upload_day , upload_time from vst_small order by upload_day desc,upload_time desc;

你可能感兴趣的:(distinct)