pgsql 删除重复的记录
DELETE
FROM
t_social_security a
WHERE
a.id <> ( SELECT MIN ( b.id ) FROM t_social_security b WHERE A.certificatenum = b.certificatenum );
编程PDF电子书免费下载: http://www.shitanlife.com/code 每天学习一点点
DELETE
FROM
t_social_security a
WHERE
a.id <> ( SELECT MIN ( b.id ) FROM t_social_security b WHERE A.certificatenum = b.certificatenum );