I\'ve few emp names like
- john,1
- devil\'s
- corn
something like this
Now when
For most versions of SQL, you need to escape the single quote, for example.
select * from emp where empname like ('john,1,devil''s,corn')
Also, the above example is looking for a very specific string value, you need to include * or ? as wildcard characters, so to look for all empname's like devil's, use
select * from emp where empname like '%devil''s%'
Another example
select * from emp where empname like 'john,1%'