View Single Post
  #3 (permalink)  
Old 09-20-2007, 05:58 AM
shashi jain shashi jain is offline
Junior Member
 
Join Date: Sep 2007
Posts: 3
shashi jain is on a distinguished road
Lightbulb ANY answer. Re: how do we delete redundant entries from a table ?

suppose there is a table named "temp" having a column "col1" and "col2".

col1 col2
---- ---
abc 100
abc 100
abc 150
xyz 200
xyz 200

then the query would be as:

"delete from temp t where t.col1 in(select t1.col1 from temp t1 where t.rowid< t1.rowid) and t.col2 in(select t1.col2 from temp t1 where t.rowid <
t1.rowid);"

Hope this would solve ur problem....
Reply With Quote