Bird
0
0

Which of the following is the correct syntax to grant SELECT permission on table employees to user john?

easy📝 Syntax Q12 of 15
PostgreSQL - Roles and Security
Which of the following is the correct syntax to grant SELECT permission on table employees to user john?
AGRANT ON employees SELECT TO john;
BGRANT john ON employees SELECT;
CGRANT SELECT TO john ON employees;
DGRANT SELECT ON employees TO john;
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct GRANT syntax

    The correct syntax is: GRANT permission ON object TO user;
  2. Step 2: Match syntax with options

    GRANT SELECT ON employees TO john; matches the correct order: GRANT SELECT ON employees TO john;
  3. Final Answer:

    GRANT SELECT ON employees TO john; -> Option D
  4. Quick Check:

    GRANT + permission + ON + object + TO + user [OK]
Quick Trick: GRANT permission ON object TO user; is the pattern [OK]
Common Mistakes:
  • Mixing order of keywords
  • Placing user before permission
  • Omitting ON keyword

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes