这个存储过程有什么问题?它无法正常工作

时间:2013-09-11 04:56:38

标签: sql oracle stored-procedures

Create Or Replace Procedure ASS1_RESET_TABLES IS
Begin
    Delete * From PAYDETAILS;

    Delete * From EMPLOYEE;

    Insert into EMPLOYEE(EmpId, EmpNumber, EmpSurname, EmpFirstname, Gender, HourlyRate)
    Values(ASS1_EMP_SEQ.nextval, 2, 'Pritchett', 'Jay', 'M', 12.50);

    Commit;
  End;

1 个答案:

答案 0 :(得分:3)

请尝试:

Create Or Replace Procedure ASS1_RESET_TABLES 
as
Begin

  Delete From PAYDETAILS;
  Delete From EMPLOYEE;

  Insert into EMPLOYEE(EmpId,EmpNumber,EmpSurname,EmpFirstname,Gender,HourlyRate)
  Values(ASS1_EMP_SEQ.nextval,2,'Pritchett','Jay','M',12.50);

  Commit;

End;

所做的更改: Delete * From PAYDETAILS;应为Delete From PAYDETAILS; IS已替换为AS