Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • find_pdbs.sql Uncategorized
  • Building Our Own Namespaces with “Create Context” Oracle
  • AWR license Oracle
  • catting.sh Linux/Unix
  • Sample WW22 listener.ora Oracle
  • arch_configUOCIOTTO.ora Oracle
  • chk_space_SID.ksh Linux/Unix
  • currwait.sql Oracle
  • kill all processes from specific user in solaris. Linux/Unix
  • Useful Solaris Commands on 28-SEP-2005 Linux/Unix
  • MYSQL for Oracle DBA MYSQL
  • Committing distributed transaction using commit force Oracle
  • Oracle 10g Wait Model Oracle
  • Test Case for Inserting Multiple (2.3 Million rows in 26 Seconds) Oracle
  • Oracle 10g Installation/Applying Patches Tips Oracle

Remove duplicate rows from table

Posted on 15-Jan-2008 By Admin No Comments on Remove duplicate rows from table

declare

cursor c1 is

select distinct PRODUCT_SKU, FIT_ID from geo_florist order by PRODUCT_SKU, FIT_ID;

begin

for cur1 in c1 loop

delete from geo_florist a

where a.rowid != ( select max(b.rowid) from geo_florist b

where a.product_sku = b.product_sku

and a.fit_id = b.fit_id)

and a.product_sku = cur1.product_sku

and a.fit_id = cur1.fit_id;

if (mod(c1%rowcount, 1000) = 0) then commit;

end if;

end loop;

end;

/

Oracle, SQL scripts

Post navigation

Previous Post: on IBM-AIX for display
Next Post: find the files that are 1 day old.

Related Posts

  • Jai Shree Ram Oracle
  • Wait time tuning research Oracle
  • tab.sql Oracle
  • Sample WW22 listener.ora Oracle
  • New OFA for 11g Oracle
  • load SPM baseline from cursor cache Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Django (0)
  • GIT (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (400)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (1)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (18)
  • rman-dataguard (26)
  • shell (150)
  • SQL scripts (348)
  • SQL Server (6)
  • Uncategorized (3)
  • Videos (0)

Recent Posts

  • Running PDB on single node in RAC09-Apr-2026
  • find_arc.sql09-Apr-2026
  • pvm_pre_change.sql08-Apr-2026
  • find_encr_wallet.sql08-Apr-2026
  • find_pdbs.sql08-Apr-2026
  • Creating a Container Database using dbaascli08-Apr-2026
  • track_autoupgrade_copy_progress.sql01-Apr-2026
  • refre.sql for multitenant01-Apr-2026
  • prepfiles.sh for step by step generating pending statistics files10-Mar-2026
  • tracksqltime.sql05-Mar-2026

Archives

  • 2026
  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • oracle Dba site Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • avail.sh ( find filesystem spae usage) Linux/Unix
  • Drop tempfiles from database Oracle
  • Oracle 10g Wait Model Oracle
  • move_arch_files.ksh /* Good One */ Linux/Unix
  • How To Transfer Passwords Between Databases (ref note: 199582.1) Oracle
  • switchover for primary database Oracle

Copyright © 2026 pvmehta.com.

Powered by PressBook News WordPress theme