我可以在jdbc中调用存储过程,该存储过程使用mysql返回表吗? [英] Can I call a stored procedure in jdbc which returns a table using mysql?

查看:69
本文介绍了我可以在jdbc中调用存储过程,该存储过程使用mysql返回表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是刚开始使用jdbc执行mysql存储过程.我的问题是,可以调用存储过程来返回jdbc中的表吗?我进行了很多搜索,我知道可以使用 registerOutParameter 使用过程返回一定数量的参数,但是整个表有几行呢?!

I'm new to using jdbc to execute mysql stored procedures. My question is that is it possible to call an stored procedure which returns a table in jdbc? I searched a lot and I know I can return a certain number of parameters using registerOutParameter using procedures, but how about a whole table with several rows?!

我希望这不是多余的帖子.

I hope it's not a redundant post.

推荐答案

是.可以调用MySQL存储过程以使用JDBC返回结果集.

Yes. It's possible to call a MySQL stored procedure to return a resultset using JDBC.

此处提供示例:

https://docs.oracle.com/javase/tutorial/jdbc/basics/storedprocedures.html#calling_javadb_mysql

这篇关于我可以在jdbc中调用存储过程,该存储过程使用mysql返回表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆