Error(8,1): PLS-00103: Encountered the symbol “SET”
问题 I'm trying to create a function using oracle, it should be working fine but i keep getting the following error: Error(8,1): PLS-00103: Encountered the symbol "SET" here is my Function: CREATE OR REPLACE FUNCTION CountViewers(nameofPlay plays.play%TYPE) RETURN NUMBER AS NUM NUMBER; BEGIN SELECT SUM(registerd) INTO num1 FROM plays WHERE play=nameofPlay; return num; END; SET SERVEROUT ON; DECLARE inc integer; res NUMBER; invalid_status EXCEPTION; CURSOR clients2 IS SELECT * FROM plays; name_of