All pastes #729770 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-10-08 09:34 UTC
rendered paste body
i have a table name "student" which has 3 columns like
id    name      friends_id
1      a          2,3
2      b          1,4
3      c          5,6,7
4      d          1,7
5      e          3,5
6      f           1
7      g          6

when i do query for id 1 i need a output like
id name friends_name
1   a    b,c

how can i normalize this table
please help me out