Which code segment would execute the stored procedure “calculateSal()” located in a database server?

1.10 Which code segment would execute the stored procedure "calculateSal()" located in a
database server?
A) Statement stmt = connection.createStatement();
stmt.execute("CALCULATESAL()");
B) CallableStatement cs = con.prepareCall("{call calculateSal }");
cs.executeQuery();
C) StoreProcedureStatement spstmt = connection.createStoreProcedure("calculateSal()");
spstmt.executeQuery();
D) PrepareStatement pstmt = connection.prepareStatement("calculateSal()");
pstmt.execute();
E) Statement stmt = connection.createStatement();
stmt.executeStoredprocedure("calculateSal()");

Leave a Reply