|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
PL/SQL stored procedure
Here is a procedure that I created. The table has 2 fields name and age. I would like to know how it run it and when I compile it, it gives me errors.
create procedure tst(va in out number,n out varchar2) as begin dbms_output.put_line('Testing...'); dbms_output.put_line('Enter age '); va:=28; select name into n from test where age = va; end; . run; set serveroutput on; begin tst; end; . ERROR: Procedure created. 1 begin 2 tst; 3* end; tst; * ERROR at line 2: ORA-06550: line 2, column 1: PLS-00306: wrong number or types of arguments in call to 'TST' ORA-06550: line 2, column 1: PL/SQL: Statement ignored Thanks. |
|
#2
|
|||
|
|||
|
The following worked for me in SQL*Plus:
SQL> create procedure tst(va in out number,n out varchar2) as begin dbms_output.put_line('Testing...'); dbms_output.put_line('Enter age '); va:=28; end; SQL> set serveroutput on No semi-colon at the end, since it's an SQL*Plus command SQL> var x number SQL> var y varchar2 SQL> exec tst(:x,:y); Testing... Enter age PL/SQL procedure successfully completed. regards, Dan |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > PL/SQL stored procedure |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|