|
-
Hi,
This is Rohit ,OCP from India.Please dont refer to the earlier pl/qsl given ,it will not solve ur problem.Use the below given program which will give u the desired result.
Inside a pl/sql u can find out the number of rows processed
by rowcount attribute of cursor.
declare
new_rows number;
old_rows number;
begin
select count(*) into old_rows from a;
insert into b
select * from a;
new_rows:=sql%rowcount;
if new_rows=old_rows then
delete from a;
commit;
else
dbms_output.put_line('Error in inserting rows');
end if;
end;
/
If any doubts please be free to write to me at
[email protected]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|