Bird
0
0

Identify the error in this SQL command:

medium📝 Debug Q6 of 15
SQL - Security Basics
Identify the error in this SQL command:
GRANT SELECT employees TO user_mary;
ASELECT permission cannot be granted
BIncorrect user name format
CTO keyword should be replaced with FOR
DMissing ON keyword before table name
Step-by-Step Solution
Solution:
  1. Step 1: Review correct GRANT syntax

    The correct syntax is GRANT permission ON object TO user.
  2. Step 2: Spot the missing ON keyword

    The command lacks ON before the table name 'employees'.
  3. Final Answer:

    Missing ON keyword before table name -> Option D
  4. Quick Check:

    GRANT syntax requires ON keyword [OK]
Quick Trick: GRANT needs ON before object name [OK]
Common Mistakes:
  • Omitting ON keyword
  • Confusing TO with FOR
  • Assuming SELECT cannot be granted

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes