I have student lookup table as
Student Table
Student id Student name
1 Sonu
2 Janu
3 Sameer
4 Shri
Course Table
Course Name Student Id
JAVA 1,2,3
SQL 2,3
HTML 3,4
PHP 2,1
I am having another table i.e course table, in that table I am just entering the student id's with comma separated values. now I wanted to get the student names using the student id's which is there in the Course Table and also student name should be there in the same order as student id that is stored in the Course Table
Result should be
Course Name Student Name
JAVA Sonu,Janu,Sameer
SQL Janu, Sameer
HTML Sameer,Shri
PHP Janu,Sonu
Can any one please help to solve this
MY sql version is :Microsoft SQL Server 2014 - 12.0.2000.8 (X64) Feb 20 2014 20:04:26 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 (Build 9600: ) (Hypervisor)