java操作oracle数据库存储过程

package com.westsoft;
import java.sql.*;
public class Main {
/**
* @throws SQLException 
* @throws ClassNotFoundException 
* @param args
* @throws  
*/
public static void main(String[] args) throws ClassNotFoundException, SQLException {
Class.forName("oracle.jdbc.driver.OracleDriver");
Connection con=DriverManager.getConnection("jdbc:oracle:thin:@mxh:1521:test","system","soft");
CallableStatement cs=con.prepareCall("{call usp_test(?,?)}");
cs.setInt(1,1);
cs.setString(2,"mxhzmm");
cs.execute();
cs.close();
con.close();
}
}
原文地址:https://www.cnblogs.com/kuailewangzi1212/p/2651565.html