ora-02437错误解决方法总结--表数据去重
来源:互联网 发布:dnf剑宗技能数据介绍 编辑:程序博客网 时间:2024/06/04 18:19
ORA-02437错误:创建表时没有添加主键,当表中已经存在很多重复数据时,再添加主键就会报这个错误。所以,设计表的时候一定要注意!
下面是这个错误的解决办法,先找出表中重复的数据,然后删除相同数据rowid最小的那一列
select * from material_tablewhere unid in (select unid from material_table group by unid having count(unid) > 1)
这里的unid 是主键列,通过主键进行分组查找出记录大于1条的数据。
找到重复数据后进行删除
delete from material_table where unid in (select unid from material_table group by unid having count(unid) > 1) and rowid not in (select min(rowid) from material_table group by unid having count(unid)>1)
- ora-02437错误解决方法总结--表数据去重
- ora-02437错误解决方法总结--表数据去重
- ora-02437错误解决方法
- Hive表数据去重
- ORA-04098错误解决方法
- ora-12154错误解决方法
- ORA-12520错误解决方法
- ORA-12520错误解决方法
- ORA-12520错误解决方法
- ORA-14452错误解决方法
- ora-12545错误解决方法
- ORA-12520错误解决方法
- ORA-01658错误解决方法
- ORA-12520错误解决方法
- ORA-14550错误解决方法
- ORA-12520错误解决方法
- ORA-12520错误解决方法
- ORA-12520错误解决方法
- 查询oracle表空间使用情况
- 你可能不知道的Shell
- Egit分布式开发之gitosis-admin克隆
- Linux——cut命令
- fix the Ubuntu GPG Error BADSIG
- ora-02437错误解决方法总结--表数据去重
- Android培训---构建一个简单用户界面
- strcpy() 函数 标准实现
- Kohonen网络
- C++获取zip文件列表
- Servlet监听
- uboot bootargs
- Command(命令)模式
- Windows CE创建桌面快捷方式