Sql query select by parent id

I need select data from table like this (its just example). I want select data in format like Category1,Category2,Category3 without root by parent_id id_category name parent_id 1 root 1 2 Graphic card 1 3 Memory 1 4 DDR3 3 5 Corsair 4 6 HyperX 4 The result should be category1 category2 category3 GraphicCard null null … Read more