怎样把表中的某个字段的相同的记录去掉。 delete 表名 where 字段=值 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 delete from table where 字段 in (select 字段 from(select 字段,count(*) cou from table group by 字段) temp where cou>1) 可能用distinct 和 group by 组合就可以了。 你的问题有点模糊删除纪录的话用 delete from table where 字段 = 直,就行了select ziduan from table where ziduan = "values" group by ziduan delete from tablename where colname in (select colname from tablename group by colname having count(colname)>1) distinct解决不了你的问题吗? 是全部去掉还是留一个?全部:delete tablename where colname in (select colname from tablename group by colname having count(*)>1) 我想问下为什么4NF允许平凡的多值依赖呢? 怎样将sqlserver的日期后推一个月? 火车票查询问题!求一条Sql语句! ASP。net+SQLSERVER 数据库链接问题。急求答案 关于 语句sp_OACreate中的这句能成功吗? if 语句嵌套,老是报错 如何在sql server服务器端取的当前已连接的客户端数目? 这样的SQL语句如何写 SQL求教 求一段SQL 触发器 求救!!!!一个SQL语句。马上给分! 一个SQL问题
(select 字段,count(*) cou from table group by 字段) temp where cou>1)
全部:
delete tablename
where colname in (select colname
from tablename
group by colname
having count(*)>1)