I have a table in sqlserver
UserID(PK) Name PhoneNumber
1 Test 123456
2 Test1 356456
And another table having FK of above table
ID RequestID UserID(FK)
1 20123 1
2 20245 1
3 21545 2
I need results as below
UserID Name phoneNumber RequestID
1 Test 123456 20123,20245
2 Test1 356456 21545
I had used the join but that gives multiple records for each row but I need result as above. Can anybody help how I should get this type of output?