1
--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;
/
警告:使用編譯錯誤創建的過程。PL/SQL語句被忽略&值不足
SQL>顯示錯誤 誤差的程序MOVIE_RENTAL_SP:
LINE/COL ERROR
7/1 PL/SQL:SQL語句忽略 9/2 PL/SQL:ORA-00947 :沒有足夠的值