postgre去重复记录

postgre去重复记录,主要用到row定位的一个系统表示 “ctid”,能查出纯净的不重复的记录,那要删掉重复值也就容易了,自己去折腾吧。

我所涉及的是得到不重复的记录,就一句话: 

select ctid, * from table007 where ctid in (select min(ctid) from table007 group by att001,att002,att003);

原文地址:https://www.cnblogs.com/rojas/p/3894780.html