Select * from table
cola colb
a b
a c
a b
a b
How to delete duplicate records excluding the first entry in a table.Expected result :
Select * from table
cola colb
a b
a c
As a workaround, you can try the following solution:
1. Create new (temporary) class
create class table_temp
Insert grouped (distinct) values to new class table
insert into table_temp from select cola, colb from your_table
group by cola, colb
Clean your table delete from your_table
Insert data from new table
insert into your_table from select cola, colb from table_temp
group by cola, colb
Ideally, these steps should be done within single transaction.