Count Users


Oracle PL/SQL Functions Language features Public New

Easy 

2min


Consider the following code:

CREATE OR REPLACE FUNCTION count_users 
RETURN NUMBER 
IS 
  user_count NUMBER;
BEGIN
  SELECT COUNT(*) INTO user_count FROM users;
  RETURN user_count;
END;
/

Select all the statements that are correct.

When the users table is dropped, the count_users function is invalidated.
When the users table is dropped any function, procedure, or package using count_users is invalidated.
When the users table is dropped, any function, procedure, and package using count_users, inside dynamic SQL is invalidated.
When the users table is dropped, the count_users function is also dropped.
As the count_users function is dependent on the users table, any statement dropping the users table will fail.