0

Now I can write the separate stored procedure.

-- get the total query id result
select id from book where bookprice>10;
-- only pass a single id
call sp_refreshbook(id); 

How to merge them together?now I want to search the id result and them call the sp_refreshbook in each id in the result in a new store stored procedure.

1
  • show us that sp_refreshbook puppy, we can create a new sp_refreshbookLooper
    – Drew
    Jun 12, 2015 at 1:19

1 Answer 1

0

I have solve this problem using cursor by myself.

open v_result_cur;
repeat
fetch v_result_cur into v_id;
IF NOT v_done THEN
select v_id; 
END IF;
until v_done end repeat;
close v_result_cur;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.