How do I search for names with apostrophe in SQL Server?

Ontonomo picture Ontonomo · Jun 28, 2011 · Viewed 108.2k times · Source
SELECT *
  FROM Header
 WHERE (userID LIKE [%'%])

Answer

Alex K. picture Alex K. · Jun 28, 2011

Double them to escape;

SELECT *
  FROM Header
 WHERE userID LIKE '%''%'