How to delete duplicate recordings at Oracle

How to delete duplicate recordings at Oracle At this info this is the How to delete duplicate recordings at Oracle, has been shared on this blog completely from start to finish. Hopefully this info will be useful to you and can be practiced.

Title : How to delete duplicate recordings at Oracle
Link : How to delete duplicate recordings at Oracle

When working on Oracle, you can find duplicates on some notes. You can delete duplicate lines by identifying them and using the RowID alias row address (row address) related. Before starting, create a backup table if you need references after the record is deleted.

Step

Identifying Duplicates

  1. Duplicate identification. In this example, we identify the "Alan" duplicate. Make sure the note to be deleted is indeed a duplicate by entering SQL below.
    Delete Duplicate Records in Oracle Step 1 Version 2.jpg
  2. Identification of the column titled "Name". If the column has the title "Name", you need to replace it "column_name" by the name.
    Delete Duplicate Records in Oracle Step 2 Version 2.jpg
  3. Identification of other columns. If you try to identify duplicates from different columns, such as Alan's age instead of his name, enter "Age" to replace "column_name" etc.
    Delete Duplicate Records in Oracle Step 3 Version 2.jpg

Removing Single Duplicate

  1. Choose "name from names". After" SQL "(short for Standard Query Language), put in "select name from names"
    Delete Duplicate Records in Oracle Step 4 Version 2.jpg
  2. Delete all rows with duplicate names. After "SQL", enter "delete from names where name= 'Alan' ;. "It should be noted that capital letters are important here so that this Step : can delete all lines named" Alan ". After" SQL ", enter"commit"[1]
    Delete Duplicate Records in Oracle Step 5.jpg
  3. Re-enter the line without duplicates. Now that you delete all the lines and replace them with "Alan", fill in one again by entering "insert into name values ('Alan'); "After" SQL ", enter"commit"to create a new line.
    Delete Duplicate Records in Oracle Step 6.jpg
  4. See the new list. After completing the Step :s above, you can check to make sure there are no duplicate records by entering "select * from names"
    Delete Duplicate Records in Oracle Step 7.jpg

Removing Multiple Duplicates

  1. Select RowID that you want to delete. After "SQL", enter "select rowid, name from names;
    Delete Duplicate Records in Oracle Step 8.jpg
  2. Delete duplicates. After "SQL", enter "delete from names a where rowid> (select min (rowid) from names b where b.name = a.name); "to delete duplicates.[2]
    Delete Duplicate Records in Oracle Step 9.jpg
  3. Check for duplicates. After completing the Step :s above, check if there are still duplicates by entering "select rowid, name from names;" then "commit"
    Delete Duplicate Records in Oracle Step 10.jpg

Delete Lines with Columns

  1. Select row. After "SQL", enter "select * from names; "to be able to see the line.
    Delete Duplicate Records in Oracle Step 11.jpg
  2. Delete duplicate lines by identifying the column. After "SQL" "enter"delete from names a where rowid> (select min (rowid) from names b where b.name = a.name and b.age = a.age); "to delete duplicate records.[3]
    Delete Duplicate Records in Oracle Step 12.jpg
  3. Duplicate check. After you complete the Step :s above, enter "select * from names; "then"commit"to ascertain whether the duplicate has actually been deleted.
    Delete Duplicate Records in Oracle Step 13.jpg

Warning

  • Create a duplicate table in your login so that it can be used as a reference for content when there is no data deleted (in case you have questions).

Source

$ 2

Source link & Translate By :


Similarly, info How to delete duplicate recordings at Oracle, hopefully this info can be useful for you all, and good luck.

Subscribe to receive free email updates:

0 Response to "How to delete duplicate recordings at Oracle"

Post a Comment