create or replace function get_fun(p_check_count number) return number is v_check_count number; begin select check_count into v_check_countfrom table_name; if v_check_count>p_check_count then return(p_check_count); else return(v_check_count); end if; end; /update table_name set check_count=get_fun(值); 用函数作判断,不使用到触发器. 该函数还没测试,试着用吧.
我同意!
is
v_check_count number;
begin
select check_count into v_check_countfrom table_name;
if v_check_count>p_check_count then
return(p_check_count);
else
return(v_check_count);
end if;
end;
/update table_name set check_count=get_fun(值);
用函数作判断,不使用到触发器.
该函数还没测试,试着用吧.