I have a Mysql/MariaDb Table
ID | name | partner
-----------------------
1 A 2
2 B 1
3 C 5,7
4 D 6,8
5 E 3
6 F 4
7 G 3
8 H 4
how to mysql query to search profile of partner with id = 3; And I want this result purely generated by the query or Stored Procedure/Function.
I have tried like this, but got the error:
SELECT id, name, partner from table WHERE id IN (SELECT id FROM table WHERE id=3);
I want output like this:
ID | name | partner
-----------------------
5 E 3
7 G 3