Sorry i am not sure how to titled the question well. I want to select few records in sql where a particular column is a set of strings.
Example . I have a table student and has columns ID and name. ID has records 1,2,3,4,5,6 . NAme has A,B,C,D,E,F.
I want to return C,D,E WHERE ID=[3,4,5].
I tried
SELECT FROM student WHERE ID=2,3,4
it gives error, ID=2,3,4 ='2,3,4'
and it reads ID as a single columns. I am confused.
Also in my case, ID set are returned in a storedprocedure variable. that is like @ID
SELECT * FROM STUDENT WHERE ID=@ID
@ID above is a variable of a string type holding the set {1,2,3}. Please any help would be appreciated.