gpt4 book ai didi

java - 使用 apache DBUtils 调用存储过程

转载 作者:行者123 更新时间:2023-12-01 15:02:24 25 4
gpt4 key购买 nike

我找不到如何使用 DBUtils 来调用可调用语句

我们可以如何指定哪些所有字段都是输入以及哪些所有字段都是输出?

最佳答案

您只需要使用CallableStatement

Connection con = ...; // get the connection
CallableStatement callStatement = con.prepareCall("{CALL yourStoredProcedure()}");
ResultSet rs = callStatement.executeQuery();
// do what you need to do

关于java - 使用 apache DBUtils 调用存储过程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13450465/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com