title: How to test if my Oracle DB version supports the PIVOT function?
body: <p>I need to work out a way to determine if Oracle is 11g or newer, because essentially I need to know if the DB I'm running on supports PIVOT.</p>
  
  <p>Getting the version number ifself is not that difficult, so I've got:</p>
  
  <pre><code>select * from v$version 
  </code></pre>
  
  <p>Unfortunately, this does not give a simple number, but 5 records including stings and various different version numbers:</p>
  
  <pre><code>Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
  PL/SQL Release 10.2.0.5.0 - Production
  CORE    10.2.0.5.0  Production
  TNS for Linux: Version 10.2.0.5.0 - Production
  NLSRTL Version 10.2.0.5.0 - Production
  </code></pre>
  
  <p>So, is there a way to determine if my Oracle is 11g or higher, or even better, if the DB supports the PIVOT statement?</p>
  
  <p>Thanks!</p>