sql id in comma separated string where clause code example Example: search from comma separated values in sql server WHERE tablename REGEXP "(^|,)@search(,|$)"