"localhost:/firebird/data/ILICHEVSK2.FDB". ��������� Previous topic Chapter index Next topic

OBJECTS_DELETE

 

������� ���������

��������

���

��������

OBJID

INTEGER

 

 

�������� ���������

(��� �������� ����������)

 

��������

������� ������ � ��� �����������

 

�����������

CREATE PROCEDURE OBJECTS_DELETE(
    OBJID INTEGER)
AS
DECLARE VARIABLE CHILDOBJ INTEGER;
begin
  delete from objects where objid = :Objid ;
  delete from objrelations where objid = :Objid;
  for
    select objrelations.objid from objrelations where objrelations.parentobjid = :objid
    into :childobj
  do begin
    delete from objrelations where ((objid = :childobj) and (parentobjid = :objid));

    if (not(exists (select objid from objrelations where objid = :childobj))) then
      execute procedure objects_delete :childobj;

  end
END

 

     Previous topic Chapter index Next topic