"localhost:/firebird/data/ILICHEVSK2.FDB". Триггеры Previous topic Chapter index Next topic

RECIPESILAGES_SetSortIndex

 

Описание

(Нет описания для триггера 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

 

     Previous topic Chapter index Next topic