I have a table with many duplicate records which need removing.
I believe the process required is to use the SELECT DISTINCT command to select all the unique records (excluding the primary key - which would make every record unique) then use the INSERT command to add then to a new table.
However, after creating an empty table matching the source table, if it includes the Primary Key it doesn’t have the same number of columns as the SELECT DISTINCT output ( no Primary Key here, or else all records are unique by definition) - hence fails.
Hence I need some SQL which can locate all the records which are duplicate (excluding the PK), but list then with the key, or add a new one.
I could create the table without the PK, but base has great difficulty using tales with no Primary Key