Multiple choice technology databases

Stored Procedures and stored function are the same, except

  1. Stored function returns a value and a stored procedure does not.

  2. Stored procedure returns a value and a stored function does not.

  3. Stored function returns a value and a stored procedure may OR may not.

  4. Stored procedure returns a value and a stored function may OR may not.

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

The fundamental difference is that a stored function MUST return a single value, while a stored procedure does NOT return a value (it can have OUT parameters but no RETURN statement). Option A captures this precisely. Option C is misleading because stored functions always return a value - they cannot optionally return or not return.

AI explanation

The defining difference between a stored function and a stored procedure in PL/SQL is that a function is required to return a single value via a RETURN statement, while a procedure has no such requirement and typically communicates results (if any) through OUT parameters instead. This is why 'stored function returns a value and a stored procedure does not' correctly captures the distinction.