I this is my first attempt to create procedure and execute it.
First I create simple table. DB scheme of table is here:
Table name: Ziaci
Columns:
- ZiakId - primary key, number
- Surname, varchar2
- FirstName, varchar2
- TriedaId - forgein key, number
Store procedure only insert data in table, I created store procudure with this SQL cmd:
create procedure ziaci_proc(surname_in in varchar2,
firstname_in in varchar2, triedaid_in in number)
is
begin
insert into ziaci (surname, firstname,triedaid) values (surname_in,firstname_in,triedaid_in);
end;
And I try call this procudure as:
execute ziaci_proc('X','Y',1)
I get this error:
ORA-00900 invalid SQL statement
An in PL/SQL Developer IDE is with red color underlined execute word.
I test this procedure and it works good.
I can only execute this procedure with this SQL command:
begin
ziaci_proc('A','B',2);
end;
What is bad, thank for help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…