如何在多条相同信息中去除多余的,只保留其中一条 select * from 表union select * from 表 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from tablename awhere not exists(select 1 from tablename where pname=a.pname and bath>a.bath) 既然没什么要求,那就取Bath最小的那条记录吧,select Pname, FromPlace, UnitType, bz, min(Bath), InPrice from 表名group by Pname, FromPlace, UnitType, bz, InPrice select 除 Bath 所有字段,max(Bath)as Bath from 表 group by 除 Bath 所有字段 delete A from tablename A,tablename Bwhere a.pname=b.pname and a.path>b.path 类型表怎么设计比较好 求诊断系统的方法 大家看看这个带in的语句怎么优化 数据库连接问题 数据发布频率问题? 使用T-SQL语句,如何将表1的一个字段里的所有记录插入到表2中? 怎么样禁止别人用软件直接把数据写进我的数据库??? 汗!差异备份还原失败 200分求解决方法 如何让重复的数据只显示一次 请问MS-SQL7.0中如何把本机当服务器并在本机登陆? 感觉企业管理器真tm不方便, 鼠标点得手都痛了!问个问题:大虾们建表的时候写sql还是直接用企业管理器的工具?? sql查詢
where not exists(select 1 from tablename where pname=a.pname and bath>a.bath)
select Pname, FromPlace, UnitType, bz, min(Bath), InPrice from 表名
group by Pname, FromPlace, UnitType, bz, InPrice
delete A from tablename A,tablename B
where a.pname=b.pname and a.path>b.path