Описание
(Нет описания для триггера RECIPESILAGES_SetSortIndex)
Определение
CREATE TRIGGER "RECIPESILAGES_SetSortIndex" FOR RECIPESILAGES
ACTIVE BEFORE INSERT POSITION 0
AS
declare variable ASortIndex Integer;
begin
select coalesce(max(SortIndex), 0) + 1
from RECIPESILAGES
where RECIPESILAGES.recipeid = new.recipeid
into :ASortIndex;
new.sortindex = :ASortIndex;
end