I have three tables in MSQL as shown below:
customer_details:
cust_id cust_name Mob_No
-----------------------------------------
1 john 9999999999
2 Rex 1234567890
customer_services:
cust_id service_id
--------------------------
1 s1
2 s2
1 s2
m_service:
service_id service_name
----------------------------
s1 IT
s2 VAT
I need the result as below:
cust_id cust_name service_name
--------------------------------------------
1 John IT, VAT
2 Rex VAT
I tried as below:
SELECT a.cust_id,a.cust_name, c.service_name
FROM customer_details a, customer_service b, m_service c
WHERE a.cust_id=b.cust_id AND b.service_id=c.service_id;
But I need the service names in the same row. Any help is highly appreciable
Thanks and Regards Biswa