Column names for ad-hoc sql

My program will receive valid sql input and should return the column names for sql. And I want to do this without executing the sql statement at all. I am looking for a Java solution.

My dbms are optimized for olap for oracle and the tables are so large that limiting the result set does not work. Actually, the lead time is unacceptable to my case. it takes more than a minute

+1
source share
1 answer

Prepare the request, but instead of executing it just call getMetaData in the prepared message. If your driver supports it, this should return result set metadata with column descriptions without querying.

+3
source

All Articles