Question: Which code segment could execute the stored procedure calculate() located in a database server? (a) Statement stmt = connection. createStatement(); stmt.execute(calculate()); (b) CallableStatement cs =
Which code segment could execute the stored procedure “calculate()” located in a database server?
(a) Statement stmt = connection. createStatement(); stmt.execute(“calculate()”);
(b) CallableStatement cs = con. prepareCall(“{call calculate}”); cs.executeQuery();
(c) PrepareStatement pstmt = connection. prepareStatement(“calculate()”); pstmt.execute();
(d) Statement stmt = connection. createStatement(); stmt.executeStoredProcedure(“calculate()”);
Step by Step Solution
3.31 Rating (154 Votes )
There are 3 Steps involved in it
b CallableSta... View full answer
Get step-by-step solutions from verified subject matter experts
