--Below is for testing only - to be deleted later
CREATE OR REPLACE PROCEDURE movie_rental_sp
(movieIdCount IN OUT NUMBER,
movieID IN OUT NUMBER)
IS
noMovie EXCEPTION;
BEGIN
SELECT MOVIE_ID, count(movie_id)
INTO movieIdCount
FROM MM_MOVIE
WHERE MOVIE_ID = movieID;
IF movieIdCount = 0 THEN
RAISE noMovie;
END IF;
EXCEPTION
WHEN noMovie THEN
DBMS_OUTPUT.PUT_LINE('No movies found');
END;
/
警告:创建的过程存在编译错误。
SQL> 显示错误 PROCEDURE MOVIE_RENTAL_SP 的错误:
LINE/COL 错误
7/1 PL/SQL:SQL 语句被忽略 9/2 PL/SQL:ORA-00947:没有足够的值