Home > database > Is there a big to be solved with the train of thought
Is there a big to be solved with the train of thought
Time:09-29
Topic 1.1, delete the duplicate records of table If the same record is duplicate records, please write the SQL statements such conditions; If you have id primary key (Numbers, since the increase 1 mode), please write the SQL statements such conditions,
CodePudding user response:
; With cte as ( The Select row_number () over (order by id desc) rids, * The From TB ) The Delete from cte where rids & gt; 1
CodePudding user response:
First get to heavy by whole group The second word is through group id