Wednesday, November 12, 2014

Removing duplicate entry from Table

Removing duplicate entry from Table
In Postgre SQL



SELECT * FROM tr_m_mr_profile t1 WHERE id NOT IN
(SELECT max (id) FROM tr_m_mr_profile t2 GROUP BY t2.mr_id,t2.profile_id, t2."value") ;

In above sintax decribe mr_id, profile_id and value is the key where to be removed as duplicate

--
Dikirim dari suwidi.or.id dengan dukungan dev-NET(system)