title: How to pass variables into MySql Procedure creation
body: <p>I want to be able to create some stored Procedures in different databases - so I want to be able to pass in the database name into the stored procedure creation statement.  </p>
  
  <pre><code>SET @SourceDBName='dev';
  DELIMITER //
  CREATE PROCEDURE test ()
  BEGIN 
      USE @SourceDBName;
      SELECT * FROM agreed_relation;
  END //
  DELIMITER ;
  </code></pre>
  
  <p>How can I pass <code>@SourceDBName</code> into the <code>CREATE PROCEDURE</code> statement?</p>