即席 SQL 的列名
我的程序将获取有效 sql 的输入,并应返回 sql 的列名称。 我想在不执行 sql 语句的情况下完成此操作。我正在寻找java解决方案。
我的 dbms 是针对 olap 进行优化的 Oracle,并且表太大,结果集限制不起作用。实际上执行时间对于我的情况来说是不可接受的。需要一分钟以上的时间
My programm will get an input of a valid sql, and should return column names for the sql.
And I want to do this with out executing the sql statement at all. I am looking for a java solution.
My dbms is oracle optimized for olap, and the tables are so big that result set restriction does not working. Actually execution time is not acceptable for my case. it takes longer than a minute
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
准备查询,但不执行它,只需调用 getMetaData 。如果您的驱动程序支持它,这应该返回带有列描述的结果集元数据,而不执行查询。
Prepare the query, but rather than executing it, just call getMetaData on the prepared statement. Provided your driver supports it, this should return the result set meta data with the column descriptions without executing a query.