<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="charset-collate-precedence">
      </a>
      12.8.2 COLLATE Clause Precedence
     </h3>
    </div>
   </div>
  </div>
  <p>
   The
   <code class="literal">
    COLLATE
   </code>
   clause has high precedence
        (higher than
   <a class="link" href="logical-operators.html#operator_or">
    <code class="literal">
     ||
    </code>
   </a>
   ), so
        the following two expressions are equivalent:
  </p>
  <div class="copytoclipboard-wrapper">
   <pre class="programlisting language-sql"><div class="docs-select-all right" id="sa44055180"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-sql">x <span class="token operator">||</span> y <span class="token keyword">COLLATE</span> z
x <span class="token operator">||</span> <span class="token punctuation">(</span>y <span class="token keyword">COLLATE</span> z<span class="token punctuation">)</span></code></pre>
  </div>
 </div>
 <br/>
</div>
