当前位置:网站首页>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)
边栏推荐
- How to resolve the public domain name to the intranet IP server -- quickly resolve the domain name and map the Internet access
- Understand JVM language
- Common shell commands (1) -- variable case conversion
- 公网域名如何解析到内网IP服务器——快解析域名映射外网访问
- 防止sql注入
- 2022 safety officer-c certificate special operation certificate examination question bank and answers
- 卷积神经网络——YOLOV2(YOLO9000)论文翻译
- 机器学习之评价指标(二)——分类评价指标
- 卷积神经网络——从R-CNN,Fast R-CNN到Faster R-CNN,Mask R-CNN
- Configuration and basic use of vim
猜你喜欢

Machine learning: IOU of concept understanding

2022 safety officer-a certificate examination questions and online simulation examination

登录页面tableLayout(表格布局)

I got the P8 "top-level" distributed architecture manual crazy spread on Alibaba intranet

Profiles vs Permission Sets

How difficult the interview is! I was forced to survive the six rounds of interview of ant financial! Almost out (interview resumption)

Oracle 11g数据库安装教程

微信小程序 云函数批量删除多条数据 Error: errCode: -502005 database collection not exists

Original direct selling MOS tube knl42150 2.8a/1500v applicable photovoltaic inverter can provide samples

【cf】#681 A. Kids Seating (Div. 2, based on VK Cup 2019-2020 - Final)
随机推荐
XStream reports an error abstractreflectionconverter$unknownfield exception when parsing XML
What are the safety risks of small games?
wallys/DR882-Qualcomm-Atheros-QCA9882-2T2R-MIMO-802.11ac-Mini-PCIe-Wi-Fi-Module-5G-high-power.
@Scheduled 和Quartz
2022 high altitude installation, maintenance and removal of test question simulation test platform operation
ts学习笔记-class
WebDriverException( selenium.common.exceptions.WebDriverException: Message: ‘chromedriver‘ executabl
The concept and characteristics of network security grid are simple and popular
Wechat applet cloud function batch delete multiple data error: errcode: -502005 database collection not exists
注释中的{@code}、{@Link} 与<p>等标签
TCP connection status identification (syn, fin, ACK, PSH, RST, urg)
卷积神经网络——从R-CNN,Fast R-CNN到Faster R-CNN,Mask R-CNN
In the first week of June, risk control of e-shield business paid attention to 15 institutions such as New Oriental XRS, which were fined
知物由学 | 易盾移动端同构实践,几步改善官网交互体验
Big gap? Requirements and conditions for candidates with different academic qualifications to take the postgraduate entrance examination
Yanrong technology was selected as Beijing's "specialized and innovative" in 2022 to lead hybrid cloud file storage
多线程导入数据并生成错误文件用redis存储
备份表恢复表
使用分布式框架WCF出现的BUG记录
Dbeaver connection MySQL error: the server time zone value 'Ö Ð¹ ú±ê ×¼ ʱ ¼ ä‘ is unrecognized or represents more than