title: List of special characters for SQL LIKE clause
body: <p>What is the complete list of all special characters for a SQL (I'm interested in SQL Server but other's would be good too) LIKE clause?</p>
  
  <p>E.g.</p>
  
  <pre><code>SELECT Name FROM Person WHERE Name LIKE '%Jon%'
  </code></pre>
  
  <p><strong><a href="http://msdn.microsoft.com/en-us/library/ms179859.aspx" rel="noreferrer">SQL Server</a>:</strong></p>
  
  <ol>
  <li>%</li>
  <li>_</li>
  <li>[specifier] E.g. [a-z]</li>
  <li>[^specifier]</li>
  <li>ESCAPE clause E.g. %30!%%' ESCAPE '!' will evaluate 30% as true</li>
  <li>' characters need to be escaped with ' E.g. they're becomes they''re</li>
  </ol>
  
  <p><a href="http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like" rel="noreferrer"><strong>MySQL:</strong></a></p>
  
  <ol>
  <li><code>%</code> - Any string of zero or more characters.</li>
  <li><code>_</code> - Any single character</li>
  <li>ESCAPE clause E.g. %30!%%' ESCAPE '!' will evaluate 30% as true</li>
  </ol>
  
  <p><a href="http://dev.mysql.com/doc/refman/5.0/en/string-comparison-functions.html#operator_like" rel="noreferrer"><strong>Oracle:</strong></a></p>
  
  <ol>
  <li><code>%</code> - Any string of zero or more characters.</li>
  <li><code>_</code> - Any single character</li>
  <li>ESCAPE clause E.g. %30!%%' ESCAPE '!' will evaluate 30% as true</li>
  </ol>
  
  <p><strong>Sybase</strong></p>
  
  <ol>
  <li>%</li>
  <li>_</li>
  <li>[specifier] E.g. [a-z]</li>
  <li>[^specifier]</li>
  </ol>
  
  <p><strong><a href="http://www.progress.com" rel="noreferrer">Progress:</a></strong></p>
  
  <ol>
  <li><code>%</code> - Any string of zero or more characters.</li>
  <li><p><code>_</code> - Any single character</p>
  
  <p><a href="http://www.progress.com/progress/products/documentation/docs/sql92/e92/e92.pdf" rel="noreferrer">Reference Guide here</a> [PDF]</p></li>
  </ol>
  
  <p><strong><a href="http://www.postgresql.org/docs/7.4/interactive/functions-matching.html" rel="noreferrer">PostgreSQL:</a></strong></p>
  
  <ol>
  <li><code>%</code> - Any string of zero or more characters.</li>
  <li><code>_</code> - Any single character</li>
  <li>ESCAPE clause E.g. %30!%%' ESCAPE '!' will evaluate 30% as true</li>
  </ol>
  
  <p><strong><a href="http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt" rel="noreferrer">ANSI SQL92:</a></strong></p>
  
  <ol>
  <li>%</li>
  <li>_</li>
  <li>An ESCAPE character <em>only if specified</em>.</li>
  </ol>
  
  <p>PostgreSQL also has the <code>SIMILAR TO</code> operator which adds the following:</p>
  
  <ol start="3">
  <li><code>[specifier]</code></li>
  <li><code>[^specifier]</code></li>
  <li><code>|</code> - either of two alternatives</li>
  <li><code>*</code> - repetition of the previous item zero or more times.</li>
  <li><code>+</code> - repetition of the previous item one or more times.</li>
  <li><code>()</code> - group items together</li>
  </ol>
  
  <p>The idea is to make this a community Wiki that can become a "One stop shop" for this.</p>