ORACLE-004-read duplicate data in a column, oracle-004-read
SELECT primary key or columns that can represent the current row FROM (SELECT primary key or columns that can represent the current row, repeated columns, row_number () OVER (partition by repeated column order by repeated column DESC) rn from tableName) where rn = 1 is read as unique and duplicates are removed through RN = 1.
The reading result is unique, and the repetition is removed through RN = 1.
Oracle query results if a field is repeated, the data with the smallest value of the other field is obtained.
Select rownum, a. * from select (name, max (results) from table_a group by name order by name);
In SQL and Oracle, how does one delete data rows with duplicate values in a column in a table? Retained a duplicate data row
SQLServer
Delete tabel from tabel a where exists (select * from tabel where id <a. id and name = a. name and age = a. age and address = a. address)
Oracle
Delete from tabel a where exists (select * from tabel where id <a. id and name = a. name and age = a. age and address = a. address)