title: Grant Privileges for TEMP Table(dynamically created by a Stored Proc)
body: <ol>
  <li>List item Initially a <strong>TEMP table created by a Stored Procedure</strong>, which does some ACTIONS</li>
  <li>There are these several TEMP tables thus created by this above said SP.</li>
  <li>I want to give <strong>SELECT</strong> permission for some of my <strong>SQL Users</strong> for these <strong>TEMP tables</strong> which was dynamically created by the above <strong>SP's</strong></li>
  </ol>
  
  <p>For the above req, I tried the below query from a <strong>ROOT user to give permission for the table with the prefix temp</strong></p>
  
  <pre><code>GRANT ALL PRIVILEGES ON  dbname .`Temp%` TO  'TEST'@'%' WITH GRANT OPTION;
  </code></pre>
  
  <p>But, still the above privileges for the user 'TEST' can't able to SELECT these TEMP tables and gves the below err:</p>
  
  <blockquote>
    <p>SELECT command denied to user 'TEST'@'localhost' for table
    'temp_ccdata_20140904101131_2'</p>
  </blockquote>
  
  <p>pls anyone suggest if there are any possibilities <strong>to grant SELECT access for the dynamic tables created by a Stored Procedure</strong></p>
  
  <p>THANKS IN ADVANCE</p>