title: In MySQL is there a variable for the current database?
body: <p>I have a script that I run on multiple databases and to run on multiple databases I just change the MySql "USE" statement.</p>
  
  <p>I'm wanting to have a select statement that outputs the current database the script is executing against as a field.</p>
  
  <p>For example:</p>
  
  <pre><code>
  USE my_db;
  
  SELECT 
    CURRENT_DB, -- this is where to insert the current executing db, i.e. "my_db"
    id, name, blah, blah
  FROM my_table
  
  </code></pre>