Multiple choice technology databases

A user wishing to invoke an SQL stored procedure that queries a table must have which of the following privileges?

  1. CALL privilege on the procedure; SELECT privilege on the table

  2. CALL privilege on the procedure; REFERENCES privilege on the table

  3. EXECUTE privilege on the procedure; SELECT privilege on the table

  4. EXECUTE privilege on the procedure; REFERENCES privilege on the table

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

To execute a stored procedure, a user needs EXECUTE privilege on the procedure itself. Since the procedure queries a table, the user also needs SELECT privilege on that table. The CALL privilege applies to procedures in some databases, but EXECUTE is the standard DB2 terminology for both stored procedures and user-defined functions.