title: Error Code 1046: No database Selected
body: <p>I wrote a stored procedure (sp_archivev3) on MySQl Workbench which is as follows. Basically, Inserting values from one database to another. </p>
  
  <pre><code>-- --------------------------------------------------------------------------------
  -- Routine DDL
  -- Note: comments before and after the routine body will not be stored by the server
  -- --------------------------------------------------------------------------------
  DELIMITER $$
  
  CREATE DEFINER=`MailMe`@`%` PROCEDURE `sp_archivev3`()
  BEGIN
  
  INSERT INTO 
       send.sgev3_archive(a_bi,
                          b_vc,
                          c_int,
                          d_int,
                          e_vc,
                          f_vc,
                          g_vc,
                          h_vc,
                          i_dt,
                          j_vc,
                          k_vc,
                          l_vc,
                          m_dt,
                          n_vch,
                          o_bit)
  SELECT     a_bi,
             b_vc,
             c_int,
             d_int,
             e_vc,
             f_vc,
             g_vc,
             h_vc,
             i_dt,
             j_vc,
             k_vc,
             l_vc,
             m_dt,
             n_vch,
             o_bit
  
  FROM   send.sgev3
  
  WHERE m_dt BETWEEN  '2014-06-09' AND CURDATE();
  
  
  END
  </code></pre>
  
  <p>When I run <code>call sp_archivev3();</code> , I get an error with an error code 1046: No database 
  selected SELECT the default DB to be used by double-clicking its name in the SCHEMAS list in the sidebar.</p>
  
  <p>Please let me know what's wrong with my stored procedure.</p>