title: How do I round a number to n significant figures (not decimal places)?
body: <p>I want to round to 2 significant figures, e.g. 1286 => 1300, 0.01286 => 0.013</p>
  
  <p>I can solve the problem like this:</p>
  
  <pre><code>set @x = -0.0127;
  select @x, ROUND(@x,2-floor(LOG10(abs(@x)))) 
  </code></pre>
  
  <p>But that's really ugly. For such a basic concept, surely there's a better way?</p>