Home » SQL & PL/SQL » SQL & PL/SQL » about delete statement
about delete statement [message #209097] Wed, 13 December 2006 05:36 Go to next message
sandeepshahare
Messages: 20
Registered: December 2006
Location: pune
Junior Member
how to delete the duplicate rows from table?
Re: about delete statement [message #209098 is a reply to message #209097] Wed, 13 December 2006 05:41 Go to previous messageGo to next message
Cthulhu
Messages: 381
Registered: September 2006
Location: UK
Senior Member
The most generic technique is to use the rowid. Assuming your table is meant to be unique on columns x and y, you would do:

delete from table a
where rowid <
(select max(rowid)
from table b
where a.x = b.x
and   a.y = b.y)
Re: about delete statement [message #209107 is a reply to message #209098] Wed, 13 December 2006 06:22 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
How about searching the board?

http://www.orafaq.com/forum/fa/448/0/

Closed.

MHE
Previous Topic: Split string to form the INSERT
Next Topic: Loading data into Oracle from Excel
Goto Forum:
  


Current Time: Sat Feb 15 19:16:08 CST 2025