Multiple choice

Which of the following is the correct difference between a procedure and a function?

  1. Procedure can be called from SQL prompt, while function cannot be called from SQL prompt.

  2. Function can return a value, while procedure cannot return any value.

  3. Functions can have arguments, while procedure cannot have arguments.

  4. Function can call procedures while procedure cannot call functions.

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

The difference between a function and procedure is that a function can return a value to its calling function while a procedure cannot return a value. Function returns a value using the 'return' keyword. A function cannot return more than one value.