Your procedure does not return anything (they are not intended to). You need to either use an Out parameter for the procedure or use a function instead.
Having said all that, given the simplicity of the procedure, is there any reason why you are using one? Why not just use plain old JDBC with a PreparedStatement?
Joined: Sep 30, 2013
am nt using plain statement to prevent sql injection (as someone suggested) and I tried using OUT parameter, still it doesnt return anything. However, could you tell me whats wrong with the below function because it doesnt get executed:-
create or replace function getdetails (empid number)
subject: How to fetch a row using a procedure through JDBC ?