title: Get MAC address from integer value
body: <p>In db value for MAC address in number format, for my query I need value in real format that like <code>XX:XX:XX:XX:XX:XX</code>. </p>
  
  <p><strong>Example</strong>: for number <code>9817108886245</code>, real MAC address value must be <code>08:ED:B9:49:B2:E5</code>.</p>
  
  <p>I wrote next query:</p>
  
  <pre><code>select regexp_replace(lpad(upper(trim(to_char(9817108886245,
      'xxxxxxxxxxxx'))), 12, '0'),
      '^([A-Z0-9]{2})([A-Z0-9]{2})([A-Z0-9]{2})([A-Z0-9]{2})([A-Z0-9]{2})([A-Z0-9]{2})$'
      , '\1:\2:\3:\4:\5:\6') as MAC
  from dual;
  </code></pre>
  
  <p>It is possible to simplify my query?</p>