Answer the question
In order to leave comments, you need to log in
How can I SELECT unique records, along with the id column, but have DISTINCT ignore it when querying?
The problem is that the id column makes all records unique, and there is no point in DISTINCT * .
Something like this is needed: SELECT (id), (DISTINCT a, b, c) FROM table
Unfortunately, group by a, b, c is too long, there are a lot of records in the database.
Help find a way out.
Answer the question
In order to leave comments, you need to log in
Your ID does not participate in DISTINCT:
Remember that Distinct must always come first
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question