Today the database except for a problem: a table in the project, the data is from the other system in the same table, but probably because of yesterday's colleague led the data in my table that the data appeared in the exact same situation (all fields), all two, need to delete the same data.
Procedure: 1. Create an intermediate table,
2. Put the non-repeating data in the original table in the intermediate table,
3. Delete the original table data
4. Put the intermediate table data into the original table
5. Delete the intermediate table
--Create an intermediate tableCREATE TABLEAtt_scatter_req_num_temp as(SELECT distinct * fromatt_scatter_req_num);--Check whether data that contains no duplicate data is inserted into the intermediate tableSelect Count(1) fromatt_scatter_req_num_temp;--Delete all data from the original tableDelete fromAtt_scatter_req_num;---inserting data from the intermediate table into the original tableInsert intoAtt_scatter_req_numSelect * fromatt_scatter_req_num_temp;--data is correctSelect Count(1) fromAtt_scatter_req_num NUM;
Since this is the operation of all the data, be cautious and make sure that there are no problems at every step.
Delete full duplicate data from an Oracle table