1

I am trying a functions which can extract the columns name,which may have alias names also, tables name, if inner queries are added it should get those columns also and if function are used in query it should get functions parameters and function names. I tried with ResultSet but it didn't help much on this.

query Example : select person_name, personaddress address from person where id=(select id from department where departmentId=id);

ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
 ResultSetMetaData rsmd = rs.getMetaData();
 String name = rsmd.getColumnName(1);
AyushKaran
  • 11
  • 1
  • 5

0 Answers0