CREATE OR REPLACE
PROCEDURE "DeleteNode" (deleteNodeID IN VARCHAR2)
AS
CURSOR children_cursor IS
SELECT "NodeID" FROM "Organize" WHERE "ParentID" = deleteNodeID;
BEGIN
FOR childIDs IN children_cursor LOOP
--调用本身
declare
BEGIN
SYS."DeleteNode"(childIDs."NodeID");
END;
--调用本身
DBMS_OUTPUT.PUT_LINE(childIDs."NodeID");
delete FROM "Organize" WHERE "NodeID"=childIDs."NodeID";
delete FROM "Node" WHERE "ID"=childIDs."NodeID";
END LOOP;
delete FROM "Organize" WHERE "NodeID"=deleteNodeID;
delete FROM "Node" WHERE "ID"=deleteNodeID;
END;