---
title: "Oracle 中删除多条一样的数据"
author: "mywebcode"
date: "2010-06-29T11:56:00Z"
tags: []
slug: "oracle"
draft: false
lastmod: "2013-05-08T10:39:01Z"
id: 1863309
url: "https://mywebcode.iteye.com/blog/1863309"
---

delete abc where (c1,c2,c3) in (select c1,c2,c3 from abc group by c1,c2,c3 having count(\*)&gt;1) and rowid not in  
(select min(rowid) from abc group by c1,c2,c3 having count(\*)&gt;1);

Oracle 中删除多条一样的数据（只剩下一条数据,根据伪列查询）；