Re: Trigger to limit number of rows in another table
You'd need Insert & Update Triggers on Table 1, each saying something like ...
declare n smallint;
set n = ( select count(*) from table2 ) - NEW.MaxNumberOfRowsTable2;
if n > 0 then
delete from table2 order by id limit n;
end if;
Subject
Views
Written By
Posted
1455
May 26, 2020 07:53AM
Re: Trigger to limit number of rows in another table
618
May 26, 2020 09:03AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.