Answer the question
In order to leave comments, you need to log in
How to find identical fields in one table in Ruby on Rails?
For example, there is an Address table with name fields.
There are two entries with the same title.
How to find two identical name-moves?
Address.where('name = name') doesn't work.
Answer the question
In order to leave comments, you need to log in
Why ask the same questions?
SELECT GROUP_CONCAT(id SEPARATOR ',') FROM Address GROUP BY name
There will be id fields separated by commas. It remains to split the line into commas and there will be line IDs
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question