On Tue, 2004-11-16 at 12:32, Holger Klawitter wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > > A little bit OT, but: > is there a way of removing duplicate rows in a table without OIDs? > ALTER TABLE ... ADD COLUMN myoid int; CREATE TEMP SEQUENCE myoidsequence; UPDATE ... SET myoid=nextval('myoidsequence'); then do the usual SELECT a.* FROM ... a, ... b WHERE a.something=b.something AND a.myoid<b.myoid; Dance and if you are done with it, ALTER TABLE ... DROP COLUMN myoid; DROP TEMP SEQUENCE myoidsequence; HTH Tino ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster