Execute stored procedure with parameters

sergionni picture sergionni · May 17, 2011 · Viewed 96.5k times · Source

I have stored procedure and should get its result.

From debugging of Java part:

return getJdbcTemplate().call(newCallableStatementCreator(inParams), getDeclaredParameters());

I've discovered procedure's name and its parameters.

How can I execute this procedure with these parameters from e.g. Oracle Sql Developer.

Thank you.

Answer

Tony Andrews picture Tony Andrews · May 18, 2011

In SQL Developer you can run a stored procedure from the SQL Worksheet window like this:

exec myproc (myparam1 => 'a', myparam2 => 2);

using named parameters, or using position parameters:

exec myproc ('a', 2);

Press the green "Run Statement" button in the toolbar to run the command.