sysdate 错误且无法编译

Error on sysdate and does not compile

我有一个无法编译的示例 pl/sql。我有 4 个错误,无法弄清楚它在哪里。我尝试过隔离过程,但我找不到丢失的部分

CREATE OR REPLACE PACKAGE TestLocks AS


  PROCEDURE testBlocks(in_iteration IN number, in_loop_no IN number, z OUT number) ;
  END TestLocks;

/

CREATE OR REPLACE PACKAGE TestLocks IS
 PROCEDURE testBlocks(in_iteration IN NUMBER, in_loop_no IN NUMBER, z OUT NUMBER) IS
BEGIN
  startdate:=sysdate;
update test_locks
set last_datetime=startdate
 where loop_no =in_loop_no;
 -- do loop


 FOR i IN in_iteration  LOOP
 update test_locks
set last_datetime=startdate
 where loop_no =in_iteraction;

  END LOOP;
END;


END TestLocks;
/
CREATE OR REPLACE PACKAGE TestLocks AS
  PROCEDURE testBlocks(in_iteration IN number, in_loop_no IN number, z OUT number) ;
END TestLocks;

CREATE OR REPLACE PACKAGE BODY TestLocks IS
 PROCEDURE testBlocks(in_iteration IN NUMBER, in_loop_no IN NUMBER, z OUT NUMBER) IS
startdate date;
BEGIN
  startdate:=sysdate;
update test_locks
set last_datetime=startdate
 where loop_no =in_loop_no;
 -- do loop

 FOR i IN 1..in_iteration  LOOP
     update test_locks
    set last_datetime=startdate
     where loop_no =in_iteraction;

  END LOOP;
END;
END TestLocks;