Answer the question
In order to leave comments, you need to log in
How to select and move rows with duplicate key value to a clean table?
There is a table:
Код;Остаток
00000406;15
00000803;6
00000745;3
00000406; 7
Код;Остаток
00000406; 7
Answer the question
In order to leave comments, you need to log in
INSERT INTO new_table (code, amount)
(SELECT code, amount FROM tabla GROUP BY code HAVING count(*) > 1)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question