Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Finding last recovered file on DR and remove all chanracters before any “/” Linux/Unix
  • Specify the Rollback segment to use in Transaction Oracle
  • sid_wise_sql.sql Further explaination Oracle
  • Find Time Consuming SQL Statements in Oracle 10g Oracle
  • findinfo.sql (SQL for getting CPU and Active session info) Oracle
  • How to know Number of CPUs on Sun Box Linux/Unix
  • Changing the Global Database Name Oracle
  • restarting network in linux Linux/Unix
  • Temporary Tablespsace Temp tablespace behaviour Oracle
  • SAN Linux/Unix
  • CPU speed on Linux Linux/Unix
  • How to Use DBMS_STATS to Move Statistics to a Different Database Oracle
  • check_copy_progress.sh Linux/Unix
  • Very clear article about oracle dataguard Oracle
  • Implementing Listener Security 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

  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • Optimizer SORT Operations Oracle
  • My Minimum Tuning Programs Oracle
  • Find nth max and min. Oracle
  • how to find OS block size Oracle
  • Implementing Listener Security Oracle

Leave a Reply Cancel reply

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

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (388)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (337)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • findinfo.sql (SQL for getting CPU and Active session info)27-May-2025
  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • catting.sh Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • How To Resolve Stranded DBA_2PC_PENDING Entries ID 401302.1 (Very Good prooven) Oracle
  • Kernel Parameter setting explaination for Processes Parameter Linux/Unix
  • pvmehta.com SQL scripts
    Find which sessions is accessing object that prevent your session to have exclusive locks in Oracle Oracle
  • Restoring a user’s original password 1051962.101 Oracle
  • In Addition to previous note, following grants needed on PERFSTAT user. Oracle
  • Global Unique Identifier Generation in Oracle 9.2 SYS_GUID() Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme