即席 SQL 的列名

发布于 2025-01-03 17:26:00 字数 164 浏览 5 评论 0原文

我的程序将获取有效 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最近可好 2025-01-10 17:26:00

准备查询,但不执行它,只需调用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文