Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Post
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Reply
while execute the stored procedure it shows the following error?
ramesh
Aug 24 2012 2:02 AM
2.5k
Reply
create or replace procedure insert_state1(p_country_id in state.countryid%type, p_state_name in state.statename%type) is
v_countryname varchar2(20);
begin
select countryname into v_countryname from country where countryid=p_country_id;
insert into state(countryid, countryname, statename) values(p_country_id,v_countryname,p_state_name);
end;
/
Procedure created.
SQL> exec insert_state1(10,'ap');
BEGIN insert_state1(10,'ap'); END;
*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SCOTT.INSERT_STATE1", line 4
ORA-06512: at line 1
where is error and how to execute?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
how to insert the data in 2 tables in pl/sql stored procedure?
error while accessing the orale 9i(sql plus)