mysql语句,根据插入时间和修改的时间差排序

WBOY
Release: 2016-06-23 13:18:51
Original
1438 people have browsed it

mysql语句,根据插入时间和修改的时间差排序。插入时间insertTime,修改时间updateTime这两个字段的时间差从大到小排序


回复讨论(解决方案)

select   (updateTime-insertTime) as times from xxx order by times desc  具体的 请根据你需求来做

select  (修改时间 - 创建时间) as t from tb  order by t  desc

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