oracle - How to update only rows selected in SYS_REFCURSOR -


i want update rows selected in cursor inside procedure , return cursor. procedure below:

create or replace procedure p_fetch_test (out_cursor out sys_refcursor)  begin    open out_cursor      select unique_id , comments , status t_test status=0  end p_fetch_test; 

i want add code in procedure update status column of rows selected in cursor out_cursor.

in short, want update rows fetched cursor out_cursor.

have updated comments column in following.change whatever want yourself.

create or replace procedure p_fetch_test (out_cursor out sys_refcursor)  begin  update t_test set comments='your_value' status=0;  open out_cursor  select unique_id , comments , status t_test status=0  end p_fetch_test; 

Comments

Popular posts from this blog

c - CUDA code not processing if block properly -

oracle11g - get root domain from url Oracle sql regex_substr -

xcode - Swift Playground - Files are not readable -