Stored Procedure accepts no parameters and returns no value - Java JDBC

Java examples for JDBC:Stored Procedure

Description

Stored Procedure accepts no parameters and returns no value

Demo Code

import java.sql.CallableStatement;
import java.sql.Connection;

public class Main {
  public static void main(String[] args) {
    try {/*from  w  w w .j a  v  a  2  s  .  c  o  m*/
      Connection conn = null;// getConnection();
      String sql = "{call process_salary}";
      CallableStatement cstmt = conn.prepareCall(sql);
      cstmt.execute();

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}

Result


Related Tutorials