title: ESCAPE SEQUENCE IN SQL SERVER
body: <p>I have to do a where by clause on my table to find the exact string match in my table
  it works fine in the following scenario</p>
  
  <pre><code>declare @issuerName varchar(max)
  set @issuerName = 'WIDEOPENWEST FINANCE, LLC'
  
  select * 
  from company 
  where ParentName = @issuerName
  </code></pre>
  
  <p>but fails for the following query</p>
  
  <pre><code>declare @issuerName varchar(max)
  set @issuerName = 'TOYS 'R' US, INC'
  
  select * 
  from company 
  where ParentName = @issuerName
  </code></pre>
  
  <p>because of the single quotes.</p>
  
  <p>Could someone let me know what it would be the best way to tackle it since single quotes can appear any where in the string? I tried adding single quotes around this variable but it doesn't work.</p>
  
  <pre><code>set @issuerName = ''TOYS 'R' US, INC''
  </code></pre>