title: MySQL RAND() 7 LIMIT
body: <p>My database table has 15 records and I want to show 9 at random on screen.</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT * FROM tablename ORDER BY RAND() LIMIT 9
  </code></pre>
  
  <p>This works as expected, but what if the table only has 9 records? I need to pull 15 random records.</p>
  
  <p>I understand this will duplicate one or more records, but that's my intention.</p>