标题:
删除数据表里的重复数据
[打印本页]
作者:
xiexie
时间:
2022-6-9 17:47
标题:
删除数据表里的重复数据
有时候需要删除数据表中的重复数据,下面是一个简单思路:
DELETE
FROM
`news`
WHERE
n_id
NOT
IN
(
SELECT
n_id
FROM
(
SELECT
n_id
FROM
`news`
GROUP
BY
class_id
)
n1
)
欢迎光临 PHP开发笔记 (http://phpvi.com/)
Powered by Discuz! 6.1.0