TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
ramesh
NA
19
46.9k
while execute the stored procedure it shows the following error?
Aug 24 2012 2:02 AM
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?
Reply
Answers (
3
)
how to insert the data in 2 tables in pl/sql stored procedure?
error while accessing the orale 9i(sql plus)