Reputation: 334
Good day.
I need to get rownum of deleted row in after trigger. I try to use :old.rownum
, but it doesn't exists in trigger. How i can get it here?
create or replace trigger my_trig
after delete on T1
begin
dbms_output.put_line(:old.rownum);
end;
/
Upvotes: 0
Views: 106
Reputation: 50037
ROWNUM
is a pseudo-column which is only available in a rowset returned by a SELECT statement. There is no ROWNUM associated with a DELETE statement because no rowset is returned by a DELETE. There is no sequential number available to a DELETE trigger which would indicate that a particular row is the first, or the tenth, or the two-thousand-forty-seventh row deleted by a particular statement.
Upvotes: 1