“SQL query to match the data in the passed comma sepearted string”

There are several occasions when we have to match whether a passed collection of id is there in the database or not , in this case we can design the SQL in such a fashion that it checks for the id = (1,2,3), so for that we need to use IN operator.

Eg:
select * from table_name where table_name.id IN (array of integer or anything else)
Now here the array of integer or anything else should be in a comma separated manner like (1,2,3) or (‘asa’,’sa’,’sasa’)