Can I call a stored procedure in jdbc which returns a table using mysql?

寵の児 提交于 2020-01-05 06:39:29

问题


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.


回答1:


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

Examples provided here:

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



来源:https://stackoverflow.com/questions/38001886/can-i-call-a-stored-procedure-in-jdbc-which-returns-a-table-using-mysql

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!