Multiple choice technology programming languages

The user Alice wants to grant all users query privileges on her DEPT table. Which SQL statement accomplishes this?

  1. GRANT select ON dept TO ALL_USERS;

  2. GRANT select ON dept TO ALL;

  3. GRANT QUERY ON dept TO ALL_USERS

  4. GRANT select ON dept TO PUBLIC;

  5. GRANT QUERY ON dept TO PUBLIC;

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

To grant all users query privileges, use GRANT select ON dept TO PUBLIC. PUBLIC is a reserved word that represents all database users. Option A incorrectly uses ALL_USERS which is not a valid grantee. Option B incorrectly uses ALL without PUBLIC. Option C incorrectly uses QUERY instead of SELECT and ALL_USERS. Option E incorrectly uses QUERY and incorrectly capitalizes PUBLIC.