sql server - T-SQL Delete half of duplicates with no primary key -
In T-SQL stored methodology, I have a complex process that compares data using floating tables, but at the end of everything. I return a single table, which ends with two rows. All the columns in the row in these lines are exactly the same and there is no primary key in this table. I just need to remove half of those that are based on the number of the row. For example, if there are eight rows all the same values I want to delete four out of them.
There is no way to get rid of them through my SP filtering because the data that has been entered is actually a duplicate of the information entered by the user, but I need half of this information.
I have done some research on this subject and have done some tests, but it seems that it is not possible to remove half of the repeated lines, is it not possible? Or is there a way?