日期:2014-05-16 浏览次数:21003 次
--大概就是这个样子,自已改下就可以了
create or replace procedure p_t(p_sal number)
as
v_shangxian number;
v_xiaxian number;
v_kouchushu number;
v_tax number;
begin
execute immediate 'select 工资下限,工资上限,扣除数,税率 from 你的表 where :1 between 工资下限 and 工资上限'
into v_shangxian,v_xiaxian,v_kouchushu,v_tax
using p_sal;
dbms_output.put_line(v_shangxian);
end;
/
------解决方案--------------------
declare
-- Local variables here
i integer;
begin
if i-1300<0 then
dbms_output.put_line('no');
return;
end if;
for item in (select * from 表) loop
if item.上限-i>=0 then
dbms_output.put_line('按这个标准交');
return;
end if;
end loop;
end;
我的异常网推荐解决方案:oracle存储过程,http://www.aiyiweb.com/oracle-develop/177537.html
我的异常网推荐解决方案:软件开发者薪资,http://www.aiyiweb.com/other/1391128.html