Home > Database > Mysql Tutorial > body text

Delete duplicate records in a SQL table

大家讲道理
Release: 2016-11-12 10:31:34
Original
1052 people have browsed it

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!