title: Oracle : Is it possible to create a Role in a Trigger?
body: <p>I have a separate table with some data and I would like to a create a new role each time a new row is inserted in that table.</p>
  
  <p>I created the following trigger: </p>
  
  <pre><code>create or replace 
  TRIGGER TestTrigger
  BEFORE INSERT ON TestTable
  REFERENCING OLD AS OLD NEW AS NEW 
  
  FOR EACH ROW BEGIN 
      create role :New.RoleName;
  END;
  </code></pre>
  
  <p>but the trigger doesn't compile.
  I have the error: PLS-00103: PLS-00103: Encountered the symbol "CREATE" when expecting one of the following: ( begin case declare exit for goto if loop mod null pragma    raise return select update while with          &lt;&lt; continue close current    delete fetch lock insert open rollback savepoint set sql    execute commit forall merge pipe purge </p>
  
  <p>Is that possible ?</p>