又是老问题,我忘了 *》_《* “如何删除重复的记录”,一条SQL语句

newlife 2001-03-26 05:52:00
...全文
139 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
neweb 2001-07-26
  • 打赏
  • 举报
回复
重复的记录是不能删除和更新的,加一个自动编号的字段再删吧:
alter table tb_name add MyID int identity(1,1)
liugys 2001-07-25
  • 打赏
  • 举报
回复
delete member,buyreproom where tt=member and tt=repid not in(select distinct * from member,buyreproom where tt=member and tt=repid)

你查查SQL语法手册吧。
powderbun 2001-07-25
  • 打赏
  • 举报
回复
能有这样一句话吗?
delete member_buyreproom where tt=member & repid not in(select distinct tt=member &repid from member_buyreproom)

我的想法是两个字段绑成一个关键字,重复的都删掉,但实现不了
amay 2001-03-28
  • 打赏
  • 举报
回复
delete tabName where sField not exists (select distinct * from tabName)
tripofdream 2001-03-27
  • 打赏
  • 举报
回复
select distinct * from table1 into table2
drop table1
newlife 2001-03-26
  • 打赏
  • 举报
回复
大哥,是删除 不 是过滤,??
yonge 2001-03-26
  • 打赏
  • 举报
回复
select distinct * from table

28,408

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧