After you connect to the database, all the stored functions/procedures and tables will be automatically populated in the Object Browser pane. You can use Data Studio to execute PL/SQL programs or SQL functions.
- To execute the function/procedure with string, enter the value as data.
- To execute the function/procedure with date, enter the value as to_date('2012-10-10', 'YYYY-MM-DD').
You can right-click the function/procedure in the Object Browser to perform the following operations:
Follow the steps below to execute a PL/SQL program or SQL function:
or right-click the program name in the Object Browser and select Execute.
If there is no input parameter, then the Execute Function/Procedure dialog box will not appear. Instead, the PL/SQL program will execute and the result (if any) will be displayed in the Result tab.
To set NULL as the parameter value, enter NULL or null.
For supported data types, the execution queries are as follows:
1 2 3 | select func('1'::INTEGER); select func('1'::FLOAT); select func('xyz'::VARCHAR); |
Example: If the input value is ab'c, then you need to enter ab''c.
The PL/SQL program is executed in the SQL Terminal tab and the result is displayed in the Result tab. You can copy the contents of the Result tab by clicking . Refer to Working with SQL Terminals for more information on toolbar options..
Refer to the Execute SQL Queries section for information on reconnect option in case connection is lost during execution.