Skip to content
Advertisement

How to avoid showing duplicate rows because conditions

The problem is where name_1 writes something to name_2 and name_2 writes something to name_1 there is a duplicate and as one result because I SELECT name_1, name_2 with condition

How is it possible to show results with no duplicate rows,

I only want to know if there is communication between user_1 and user_2

Advertisement

Answer

Order the names in a consistent way, then make it DISTINCT.

User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement