去除重复 表id name size我要去除重复的name并且留下size数字最大的????? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select *from tb twhere not exists(select 1 from tb where name=t.name and size>t.size) select * from tb twhere not exists(select 1 from tb where name=t.name and size>t.size) 如果不要显示idselect name,max(size) as size from tb group by name select * from tb twhere not exists(select 1 from tb where name=t.name and size>t.size) select name,max(size) as size from tb group by name select * from tb t where not exists(select 1 from tb where name=t.name and size>t.size) select *from tb twhere size=(select max(size) from tb where name=t.name) 密码安全性问题! 请教下如何找出含有相同字符的数据字段找出来!!!!!!!!!!!!!!! access数据库的一个查询和更新问题 关于外键的问题 如何使SQL2000 server与sql 7.0的数据库保持数据同步?(奖分100) 请问:如何在基本表中添加带有约束的属性列? 关于建库的问题 请问数据库的打开方式conn,x,y中的X,Y参数不同各代表什么意思啊? 判断字符串是否为英文字母,除了自己写函数外还有办法吗? 看起简单其实有点难的sql语句 用sql语句按指定时间段分组统计 如何檢查哪些表的索引需要重建或重組?
from tb t
where not exists(select 1 from tb where name=t.name and size>t.size)
where not exists(select 1 from tb where name=t.name and size>t.size)
select name,max(size) as size from tb group by name
where not exists(select 1 from tb where name=t.name and size>t.size)
select * from tb t where not exists(select 1 from tb where name=t.name and size>t.size)
*
from
tb t
where
size=(select max(size) from tb where name=t.name)