If you have a primary key you can self join the table on the rows that would
define a table as duplicate and delete the one with a higher primary key
field.  If the table is related to other tables (ie the pk is an fk in
another table) you have to make sure you update all the rows to point to the
new key.

If there is no pkey, then you would do a select distinct into a temp table
as was suggested by Michael in the post above mine


"Holger Klawitter" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


A little bit OT, but:
  is there a way of removing duplicate rows in a table without OIDs?

Mit freundlichem Gruß / With kind regards
Holger Klawitter
- --
lists <at> klawitter <dot> de
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFBmeVA1Xdt0HKSwgYRAklNAJ4l0KtMVF2Tkhx5ZgyPR38LHXd/LACeNk4q
mwf/f5rI7VdckPfgfUotnSc=
=qpV0
-----END PGP SIGNATURE-----

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly



---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply via email to