Home  >  Article  >  Database  >  Delete duplicate records in a SQL table

Delete duplicate records in a SQL table

大家讲道理
大家讲道理Original
2016-11-12 10:31:341053browse

假如表为Mytable
SELECT distinct * FROM into 临时表 from MyTable
DELETE from MyTable insert into MyTable
SELECT * FROM 临时表 
drop table 临时表

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn