How to run a stored procedure in oracle sql developer?
Try to execute the procedure like this,
var c refcursor;
execute pkg_name.get_user('14232', '15', 'TDWL', 'SA', 1, :c);
print c;
Consider you've created a procedure like below.
CREATE OR REPLACE PROCEDURE GET_FULL_NAME like
(
FIRST_NAME IN VARCHAR2,
LAST_NAME IN VARCHAR2,
FULL_NAME OUT VARCHAR2
) IS
BEGIN
FULL_NAME:= FIRST_NAME || ' ' || LAST_NAME;
END GET_FULL_NAME;
In Oracle SQL Developer, you can run this procedure in two ways.
1. Using SQL Worksheet
Create a SQL Worksheet and write PL/SQL anonymous block like this and hit f5
DECLARE
FULL_NAME Varchar2(50);
BEGIN
GET_FULL_NAME('Foo', 'Bar', FULL_NAME);
Dbms_Output.Put_Line('Full name is: ' || FULL_NAME);
END;
2. Using GUI Controls
Expand Procedures
Right click on the procudure you've created and Click Run
In the pop-up window, Fill the parameters and Click OK.
Cheers!