I know the question is little ambiguous. I hope I am able to clarify the question here.
I have a table,Table Name: user_group_relation
|--------------------------------------|
| userId | userId_1 | groupId | amount |
|--------------------------------------|
| 3 | 5 | 1 | 0.00 |
|--------------------------------------|
I want to issue a update on the table, so as I have two columns userId and userId_1 which have the userId of two different users.
I have a relation (3,5) is there any way I can look up in the table for this combination where the relation (userId_1, userId) could have been stored as either (3,5) or (5,3)