title: PL/SQL Code Validation without execution
body: <p>I would like to be able to validate that a piece of code is correct using only PL/SQL.</p>
  
  <p>For example, I have the following code in a variable, I would like to validate it:</p>
  
  <pre><code>my_code:='BEGIN
             package1.get_wordlist_keywords_PG;
             package1.get_wordlist_keyword_cat_PG;
            END;
  '
  </code></pre>
  
  <p>I would like to do something like:</p>
  
  <p>result:=validate_code(my_code);</p>
  
  <p>and result would be "valid" or "invalid"  (or with error message etc.)</p>
  
  <p>I am sure this would be possible, as Oracle Apex allows users to enter PL/SQL and runs a validation on the code when it is saved.</p>
  
  <p>I am on Oracle 12c.</p>
  
  <p>Thanks!</p>
  
  <p>P.S. - I do not need to validate a simple sql select, it needs to be a PL/SQL code block.</p>