Multiple choice

Which of the following keywords is NOT present in a 'function declaration'?

  1. Declare

  2. Begin

  3. Return

  4. Exception

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The declaration section of a PL/SQL program is used to contain all variable declarations. While using a function, the declare keyword is replaced by 'is' keyword. All the variables are declared inside the 'is' keyword. For example, CREATE OR REPLACE FUNCTION myfunc  RETURN VARCHAR(20); IS sname VARCHAR(20); BEGIN SELECT studname INTO sname FROM students WHERE rollno = 1; RETURN sname; END;