- Joined
- Apr 22, 2022
- Messages
- 2
- Reaction score
- 0
Hello All, I'm trying to make a very basic procedure on PLSQL but when I try to use it in SQL it returns an invalid identifier.
what's wrong in this code? Also, According to this post, PL/SQL handles errors and exceptions effectively with the help of the inbuilt exception handlers. Can anyone tell me the error handling feature is present in SQL as well?
SQL:
create or replace PROCEDURE YEARS_BETWEEN(date1 IN date, date2 IN date, p_result out number)
IS
v_months number;
BEGIN
v_months := months_between(date1, date2);
p_result := TRUNC(v_months / 12, 0);
END years_between;
what's wrong in this code? Also, According to this post, PL/SQL handles errors and exceptions effectively with the help of the inbuilt exception handlers. Can anyone tell me the error handling feature is present in SQL as well?