title: Using variable in a LIMIT clause in MySQL
body: <p>I am writing a stored procedure where I have an input parameter called <em>my_size</em> that is an <em>INTEGER</em>. I want to be able to use it in a <code>LIMIT</code> clause in a <code>SELECT</code> statement. Apparently this is not supported, is there a way to work around this?</p>
  
  <pre><code># I want something like:
  SELECT * FROM some_table LIMIT my_size;
  
  # Instead of hardcoding a permanent limit:
  SELECT * FROM some_table LIMIT 100;
  </code></pre>