CallableStatement执行存储过程:
一、带有输入参数的存储过程:
1、准备工作:数据库中创建存储过程
2、在数据库中调用存储过程:
3、在jdbc中调用存储过程:
package sram.jdbc.connection;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.ResultSet;
import org.junit.Test;
import sram.util.jdbc.JdbcUtil;
/**
* 使用CablleStatement调用存储过程
*/
public class Demo6 {
/**
* 调用带有输入参数的存储过程
* CALL pro_findById(2);
*/
@Test
public void test1(){
Connection conn = null;
CallableStatement stm