title: Sybase IQ: Granting a right on tables of one user to anther user
body: <p>I'm looking for a way to <strong>grant some right</strong> (say SELECT) <strong>on all tables</strong> of <strong>one user to</strong> some <strong>other user</strong>.
  Something like that:</p>
  
  <pre><code>GRANT SELECT ON Username1.* to Username2
  </code></pre>
  
  <p>Important condition is that I need <strong>not only</strong> granting the right to <strong>all existing tables</strong>, but I also want, that <strong>all tables</strong> that <strong>will be created</strong> by Username1 <strong>by default should be granted</strong> with correspondent right to Username2</p>
  
  <p>What I've done is creation a an external script for choosing all tables created by Username1:</p>
  
  <pre><code>SELECT table_name FROM systable WHERE creator IN (SELECT user_id from sysuser WHERE username='Username1')) 
  </code></pre>
  
  <p>and generating GRANT statements for every of them.</p>
  
  <p>But than I need to execute that script as soon as new table is created. 
  It is not really elegant to have that granting logic out of the database. 
  I would prefer having kind of trigger within the database, but Sybase IQ does not support triggers.</p>
  
  <p>Anybody have idea how to solve the problem in elegant manner?</p>