Sunday 3 March 2013

How to call stored procedure using JDBC API?


Stored procedures can be called using CallableStatement class in JDBC API. Below code snippet shows how this can be achieved.

Code Snippet:

            CallableStatement cs = con.prepareCall("{call MY_STORED_PROC_NAME}"); 
            ResultSet rs = cs.executeQuery();  

No comments:

Post a Comment