SQL问题~急急急 在sql中查询出3条信息,除时间外其他的都一样,我怎么用语句过滤,只显示最晚添加的那一条呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 用max(time)找到最晚的那条记录,然后匹配也可以。 max(time) 或者是 按时间倒序排序的 第一条 --Oracle时间排序select * from (select * from boss_orderinfo t order by t.createdate desc)where rownum = 1;Sql Server可以用Top 用时间顺序或者用max(time)找到最晚的那条记录,如无意外应该可以的! select top1 from table order by time desc select * form table where .... order by time desc limt 1 max(time)可以取到最近的一条记录 select time from table where time not in (select distinct table.time from table t1 join table t2 on (t1.time<t2.time) ) 不使用函数实现提取时间值最大记录 用数据库中的聚合函数 max() SSH整合 spring2.5如何实现web上的文件上传 JSP界面中如何时时的读取界面中输入的变量 如何将Blob里的图片显示在页面上? jtds连接数据? 如何利用CSS中的ime-mode用来控制页面上文本框中的全角/半角输入?(在线等待) socket报connection reset异常 简单的数据类型转换 tomcat启动窗口一闪而过,有什么办法停住? jsp 查询显示 100分 oracle出现了 org.hibernate.TransactionException: JDBC begin failed: jquery uploadify 问题
或者是 按时间倒序排序的 第一条
--Oracle时间排序
select * from (select * from boss_orderinfo t order by t.createdate desc)where rownum = 1;Sql Server可以用Top
可以取到最近的一条记录
不使用函数实现提取时间值最大记录