Home > Backend Development > PHP Tutorial > mysql 查询怎么写

mysql 查询怎么写

WBOY
Release: 2016-06-23 14:15:39
Original
909 people have browsed it



我想查询 相同vUserCode里的最新时间,
我自己写的sql 语句,select * from table group by vUserCode order by cDate desc


回复讨论(解决方案)

select * from (select * from table order by cDate desc) t group by vUserCode 

select max(cDate) from table group by vUserCode

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template