当前位置:网站首页>Find redundant duplicate records in the table, delete and retain the minimum one
Find redundant duplicate records in the table, delete and retain the minimum one
2022-07-27 18:09:00 【@Calm down】
** Look up redundant duplicate records in the table, delete and retain the smallest **
select * from Table name where ( Field 1, Field 2) in(select Field 1, Field 2
from Table name group by Field 1, Field 2 having count(*) > 1);
** If you can find it out , Delete redundant duplicate records in the table ( Multiple fields ), There is only rowid Minimum record **
delete from Table name where ( Field 1, Field 2) in (select Field 1, Field 2 from Table name group by Field 1, Field 2 having count(*) > 1) and rowid not in (select min(rowid) from Table name group by Field 1, Field 2 having count(*)>1)
边栏推荐
- X-sheet development tutorial: initialization configuration custom layout
- 登录页面tableLayout(表格布局)
- 微信小程序 实现位置地图显示,引入map地图,不含导航
- Anaconda uninstall again
- hutool- 数组工具
- How difficult the interview is! I was forced to survive the six rounds of interview of ant financial! Almost out (interview resumption)
- 卷积神经网络——YOLOV2(YOLO9000)论文翻译
- 面试常见问题一二
- 【Codeforces】 B. Make it Divisible by 25
- Activate genuine win7 ultimate system with slmgr command
猜你喜欢

工信部再治数据安全,网易易盾“隐私合规”守住企业经营底线

卷积神经网络——SSD论文翻译

Introduction to ef framework

Class not found: “com.parkManagement.dao.DaoTest 测试找不到测试类

What's the use of games| Game application value research case collection

知物由学 | 关联图分析在反作弊业务中的应用

Knowledge dry goods: basic storage service novice Experience Camp

Know things by learning | build a real-time anti plug-in mechanism from 0 to 1 to supplement the offensive and defensive power of mobile games in multiple dimensions

Big gap? Requirements and conditions for candidates with different academic qualifications to take the postgraduate entrance examination

Dbeaver connection MySQL error: the server time zone value 'Ö Ð¹ ú±ê ×¼ ʱ ¼ ä‘ is unrecognized or represents more than
随机推荐
Help, boost and take responsibility, the new value and significance of the 6th Tuba rabbit 718 national home decoration Festival
微信小程序 云函数批量删除多条数据 Error: errCode: -502005 database collection not exists
Machine learning: IOU of concept understanding
[introduction to database system (Wang Shan)] Chapter 11 concurrency control
How to solve the error of ora-00955 when Oracle modifies the primary key
js实现页面或DOM元素平滑滚动
ES查询限制10000条数据解决方法
Salesforce File Share and Security
Salesforce dynamic dashboard dynamic reports, limitations and Solutions
Getting started with shell programming base
Convolutional neural network -- Introduction to FPN (feature pyramid networks)
Bubble sorting in JS
知物由学 | 易盾移动端同构实践,几步改善官网交互体验
6月第1周易盾业务风控关注 | 新东方学而思等15家机构被顶格罚款
Wechat applet realizes location map display and introduces map map without navigation
知物由学 | 从0到1搭建实时反外挂机制,多维度补充手游攻防力
WPF做登陆界面
hutool- 数字计算
[introduction to database system (Wang Shan)] Chapter 1 - Introduction
What's the use of games| Game application value research case collection