在sql中? 你做删除或者更新应该有条件吧 ?根据条件select count(1) from ..就是可以得出数目
create or replace trigger del_update_xxx before delete or update on xxx declare v_count number; begin select count(*) from xxx where 条件 dbms_output.put_line('影响记录数:'||v_count); end;
谢谢两位, 1、怎样的在程序中把delete from 或update 替换成select 呢,我是自己写的sql工具,自己输入sql语句,然后执行。 2、我没有建触发器的权限。能否用@@rownum之类的方法(网上查的),怎么用?
create or replace trigger del_update_xxx
before delete or update on xxx
declare
v_count number;
begin
select count(*) from xxx where 条件
dbms_output.put_line('影响记录数:'||v_count);
end;
1、怎样的在程序中把delete from 或update 替换成select 呢,我是自己写的sql工具,自己输入sql语句,然后执行。
2、我没有建触发器的权限。能否用@@rownum之类的方法(网上查的),怎么用?