title: Get table names using SELECT statement in MySQL
body: <p>In MySQL, I know I can list the tables in a database with:</p>
  
  <pre><code>SHOW TABLES
  </code></pre>
  
  <p>However, I want to insert these table names into another table, for instance:</p>
  
  <pre><code>INSERT INTO metadata(table_name) SHOW TABLES /* does not work */
  </code></pre>
  
  <p>Is there a way to get the table names using a standard SELECT statement, something like:</p>
  
  <pre><code>INSERT INTO metadata(table_name) SELECT name FROM table_names /* what should table_names be? */
  </code></pre>