To run a stored procedure in Oracle SQL Developer, follow these steps:
1. Open SQL Developer
Launch Oracle SQL Developer and connect to the database.
2. Locate the Procedure
Navigate to the “Connections” panel on the left.
Expand your connection → “Procedures” → find the stored procedure.
3. Run the Procedure
There are two main ways to execute the procedure:
Option 1: Use a SQL Command
Open a SQL Worksheet (Ctrl+Shift+N or right-click your connection and select “SQL Worksheet”).
Use the EXEC or BEGIN…END block to call the procedure:
sql
Copy code
EXEC procedure_name;
Or:
sql
Copy code
BEGIN
procedure_name;
END;
Press F5 (Run Script) or Ctrl+Enter (Run Statement) to execute.
Option 2: Right-Click and Execute
Right-click on the procedure in the “Connections” panel.
Select “Run”.
If the procedure has parameters, a dialog will appear to input values. Fill them in and click “OK”.
4. View Results
If the procedure outputs results, you’ll see them in the “Script Output” or “DBMS Output” panel.
To enable DBMS_OUTPUT, click on “View” → “DBMS Output”, then enable it for your connection.