create procedure pro_test(p_proid in number,p_other_col1 in varchar2,p_other_col2 in varchar2) asbegin update project_info set other_col1 = p_other_col1,other_col2 = p_other_col2 where proid = p_proid ; --commit; end;
这个应该很简单吧,居然会各种报错?楼上的写的就差不多了。。create or replace procedure p_update_project(i_proid in varchar2, i_col1 in varchar2, i_col2 in varchar2) asbegin update project_info set col1 = i_col1, col2 = i_col2 where proid = i_proid; commit; exception when others then dbms_output.put_line(sqlerrm); end;
update project_info set other_col1 = p_other_col1,other_col2 = p_other_col2
where proid = p_proid ;
--commit;
end;
i_col1 in varchar2,
i_col2 in varchar2) asbegin
update project_info
set col1 = i_col1, col2 = i_col2
where proid = i_proid; commit;
exception
when others then
dbms_output.put_line(sqlerrm);
end;