---
title: "数据库去重"
author: "fordream"
date: "2012-11-19T16:07:33Z"
tags: []
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2012-11-19T16:07:33Z"
id: 1729576
url: "https://fordream.iteye.com/blog/1729576"
---

create new\_tab as (select distinct * from old\_tab);  
drop old\_tab;  
rename new\_tab;---把新的表重命名为旧的表名。