SQL查询问题 select * from a xwhere not exists (select 1 from awhere 编号=a.编号and 时间>a.时间) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 or:select * from a xwhere 时间= (select max(时间) from awhere 编号=a.编号) or :select x.* from a x,(select 编号,max(时间) as 时间 from agroup by 编号) as ywhere x.编号=y.编号and x.时间=y.时间 select a.* from table a,(select 编号,max(时间) from table group by 编号)b where a.编号=b.编号 用SQL语句如何能查找到不同编号时间为最大值的记录信息呢?这个可能会有重复值! 通配符 表中有分多次导入的数据,我想保留最后一次导入的数据,怎么选择出来? 请问如何锁定表 Microsoft SQL Server 2008 R2 SP2 - Express Edition安装问题 请教一个关于对datetime数据统计的问题! sql server 2008如何设置远程调试 如何同时生成PO 和ITEM两个表 再请帮忙看看~ 求助高手:我如何将带有数据库格式的 *.sql (SQL server7生成)...... 我要重装系统,已把sqlserver中数据库备份为.bak文件。问是否重装完系统,只要用restore语句即可? SQL分组求和的问题 SQL语句
where 时间= (
select max(时间) from a
where 编号=a.编号
)
select 编号,max(时间) as 时间 from a
group by 编号
) as y
where x.编号=y.编号
and x.时间=y.时间
这个可能会有重复值!