title: Get dynamic SQL column names from Hibernate
body: <p>I have an Oracle table that has a CLOB in it. Inside this CLOB can be a SQL statement. This can be changed at any time.</p>
  
  <p>I am currently trying to dynamically run these SQL statements and return the column names and data back. This is to be used to dynamically create a table on the web page.</p>
  
  <p>Using Hibernate, I create the query and get the data like so:</p>
  
  <pre><code>List&lt;Object[]&gt; queryResults = null;
  SQLQuery q = session.createSQLQuery(sqlText);
  queryResults = q.list();
  </code></pre>
  
  <p>This gets the data I need, but not the column names. I have tried using the <code>getReturnAliases()</code> method, but it throws an error that the "java.lang.UnsupportedOperationException: SQL queries do not currently support returning aliases"</p>
  
  <p>So my question is: Is there a way through Hibernate to get these values dynamically?</p>