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

1 Expert Approved Answer
Step: 1 Unlock

b CallableSta... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Advanced Java Programming Questions!