如何实现 Select max(id) as id,code,max(others) from 表 group by code 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from yourtable A where id = (select max(id) from yourtable where code = A.code) select * from 表 tem where id =(select max(id) from 表 where CODE=tem.CODE) select * from yourtable A where id = (select max(id) from yourtable where code = A.code) select * from yourtable A where id = (select max(id) from yourtable where code = A.code) select * from yourtable A where id = (select max(id) from yourtable where code = A.code) select * from 表 tem where id =(select max(id) from 表 where CODE=tem.CODE) select * from yourtable A where id = (select max(id) from yourtable where code = A.code) select * from 表 aa where not exists (select 1 from 表 bb where aa.code=bb.code and aa.id<bb.id) 受各位启发,我也想到了一个方法select * from 表 where id in(select max(id) from 表 group by code ) select * from 表 tem where id =(select max(id) from 表 where CODE=tem.CODE) 装有花生壳的sql server2000数据库,程序如何写连接字符串 求SQL查询语句,分数立等可取 sql中这样的交叉表如何查询 基础的程序问题,我问一下下面这段代码是什么意思? 怎么样才能把行横过来变成列? 我想查询人员2004年6月份在职人员总数如何得之? 哪些场合需要用到binary/varbinary这样的数据类型?? 安装问题,解决后马上给分 很菜的问题,各位请进!!! 按列展开!!字段名???!!!! SQL server 登录名怎么和数据库登录名相关联? 敏感数据加密,SQL如何做?
select * from 表 aa where not exists (select 1 from 表 bb where aa.code=bb.code and aa.id<bb.id)
select * from 表 where id in(select max(id) from 表 group by code )