请问如何转换这个表 select id,max(id2) as id2,max(item1) as item1 group by id 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select id,id2=max(id2),item1=(select item1 from 表表1 b where a.id = b.id and max(a.id)= b.id)from 表表1 a group by id 跟我的问题类似呢!:)http://expert.csdn.net/Expert/topic/1251/1251173.xml?temp=.1300623 或者:select * from 表表1 a, (select id,id2=max(id2) from 表表1 group by id) as bwhere a.id = b.id and a.id2 = b.id2 我已经解决了。http://expert.csdn.net/Expert/topic/1251/1251173.xml?temp=.1300623 呵呵,再来一遍select a.* from 表一 a, (select id , max(id2) id2 from 表一 group by id ) b where a.id= b.id and a.id2= b.id2 一个SQL语句,要求效率 数据库操作执行时间的问题! 以某个表为基准,对另外一个表的更新的问题 行合并 在T-SQL中只有while一种循环么? 问一个特别基础的问题,谢谢回答! select嵌套查询 寻求简单解决方法 急 在线等待 SQL起不来了,快来看看这个信息怎么了? 在SQL 中用什么字段类型来计算多个字段的运算。。。 如何将一个表的行列转置.要求用一条sql实现.谢谢 如何将float类型数据格式化为0.00%
where a.id = b.id and max(a.id)= b.id)
from 表表1 a
group by id
select *
from 表表1 a,
(select id,id2=max(id2) from 表表1 group by id) as b
where a.id = b.id and a.id2 = b.id2