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