select from
(select distinct product,propicpropic from product,propic where productgoods = propicgoods) as t1
where
(select count() from (select distinct product,propicpropic from product,propic where productgoods = propicgoods) as t2 where t1goods=t2goods and t1propic<t2propic)=0
这样执行下
1、在电脑上打开要去掉重复数据的数据库,这里新建一张含有重复数据的user表。
2、输入“select from user where name in (select name from user group by name having count(name) > 1) ”sql语句,点击运行可以看到查询出了数据库中user表的重复数据。
3、通过“delete from user where name in (select name from user group by name having count(name) > 1) ”sql语句删除姓名重复的数据。
4、也可以通过“select distinct name from user”sql语句来去掉重复数据,这里去掉了张三的重复数据。
5、通过“select distinct class from user”sql语句来去掉班级相同的重复数据。
以上就是关于access 数据库 去重复数据查询求助全部的内容,包括:access 数据库 去重复数据查询求助、用sql语句进行多表连接查询出现重复数据、等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)