SQL查询语句,怎么查?? 要取出所有mphone的sendtime的最新数据.怎么取?? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select mphone,max(sendtime) from TB group by mphone select mphone,sendtime from tb order by ID desc select * from tb aa where SendTime=(select SendTime=Max(SendTime) from tb a where a.MPhone=aa.MPhone) select * from tb a where not exists(select 1 from tb b where a.mphone = b.mphone and a.sendtime < b.sendtime) select * form TB A where not exists(select 1 from TB where a.mphone=mphone And a.sendtime<sendtime) select * FROM TB t where sendtime=(select max(sendtime) from tb where mphone=t.mphone) select top 1 *,from TB ore by id desc SELECT mphone,sendtime from ( select mphone ,sendtime ,RANK() OVER (Patition by mphone, Order by sendtime DESC) AS rank from TB ) as aWhere rank =1 对字段sendtime建立非聚集索引,再利用SQL查询语句,其速度很快 update ,值从另外一个表查询 简单sql 为何总是报错? sql简单问题 一对多数据合并 大问题!!!怎样查看作业调度 请教一个查询的实现方法 请教个删除表的问题---解决就结帖 求一个简单的sql哈!高手进啊 怎么取一个字段值的第一个字 数据库查询分页的问题(在线等待!!!,分不够再加) 语义对象分析法的探讨??? 看看吧。。。。。 存储过程调用http页面
select mphone,sendtime from tb order by ID desc
(
select
mphone
,sendtime
,RANK() OVER (Patition by mphone, Order by sendtime DESC) AS rank
from TB
) as a
Where rank =1