編寫1個函數,实现加減乘除的功能,要求有異常處理功能,兄弟必须得用orcale写哦

編寫一個函數,实现加減乘除的功能,要求有異常處理功能,兄弟必须得用orcale写哦
編寫一個函數,实现加減乘除的功能,要求有異常處理功能,兄弟必须得用orcale写哦 
------解决方案--------------------
看着真别扭。是Oracle不是orcale編寫1個函數,实现加減乘除的功能,要求有異常處理功能,兄弟必须得用orcale写哦
create or replace function func_math_oper(str in varchar2)
return number
as
v_result number;
begin
  execute immediate 'select '
------解决方案--------------------
str
------解决方案--------------------
' from dual' into v_result;
  return v_result;
exception
  when others then
    return -1;
end;
/