一个数据去重sql
参考:
https://www.jb51.net/article/129656.htm
DELETE testcase
FROM
testcase,
(
SELECT
max(id) id,
api_purpose,
api_host,
request_url,
request_data,
assert_method,
check_point,
correlation,
active,
creater
FROM
testcase
GROUP BY
api_purpose,
api_host,
request_url,
request_data,
assert_method,
check_point,
correlation,
active,
creater
HAVING
count(*) > 1
) t2
WHERE
testcase.api_purpose = t2.api_purpose
and testcase.api_purpose = t2.api_purpose
and testcase.api_host = t2.api_host
and testcase.request_url = t2.request_url
and testcase.request_data = t2.request_data
and testcase.assert_method = t2.assert_method
and testcase.check_point = t2.check_point
and testcase.correlation = t2.correlation
and testcase.active = t2.active
and testcase.creater = t2.creater
and testcase.id <t2.id;
最新文章
- 剑指offer系列25---构建乘积数组
- C++设计模式——代理模式
- 谷歌浏览器-如何让Chrome默认以隐身模式启动?
- materialish-progress
- facebook分块加载,页面优化,BigPipe,简单实例
- (转) 谈C/C++指针精髓
- 网易云课堂_程序设计入门-C语言_第五周:函数_2完数
- 证据权模型(C#版)
- xmlns:xsi ——是指xml文件遵守xml规范,xsi全名:xml schema instance
- 阿里ECS配置MSSQL远程连接的坑
- 转:C# 对委托的BeginInvoke,EndInvoke 及Control 的BeginInvoke,EndInvoke 的理解
- 118. Pascal&#39;s Triangle (java)
- Project Euler 54
- 011-jdk1.8版本新特性三-Date API
- [svc]kill pkill killall管理进程
- 一分钟掌握Spring中bean的生命周期!
- NHibernate Configuring
- Spring boot Junit Test单元测试
- python类可以任意添加属性
- PHP提取字符串中的手机号正则表达式怎么写
热门文章
- git SSL certificate problem: unable to get local issuer certificate
- 多个线程对hashmap进行put操作的异常
- RxJava系列之二 变换类操作符具体解释1
- Python类私有方法的陷阱
- ORA-00904:&;quot;T1&;quot;.&;quot;AREA_ID&;quot; :标识符无效
- CDOJ 1330 柱爷与远古法阵(高斯消元)
- C# 获得资源文件下图片的路径
- go语言笔记——切片底层本质是共享数组内存!!!绝对不要用指针指向 slice切片本身已经是一个引用类型就是指针
- P3469 [POI2008]BLO-Blockade tarjan
- php 时间戳和时间的转换