Difficulty: Easy
Correct Answer: CREATE USER
Explanation:
Introduction / Context:
Managing identities is a core administrative task. Before granting privileges, you must create a user (or role/login depending on the RDBMS). The canonical DDL for this action in many SQL dialects uses the CREATE USER statement with options for authentication and default schema/roles.
Given Data / Assumptions:
Concept / Approach:
CREATE USER is the standard DDL verb phrase. Examples: PostgreSQL (CREATE USER name WITH PASSWORD '...), Oracle (CREATE USER name IDENTIFIED BY ...), MySQL (CREATE USER 'name'@'host' IDENTIFIED BY ...). Fake commands like “ADD USER TO DATABASE” or “MK USER” are not valid SQL statements across mainstream engines.
Step-by-Step Solution:
Verification / Alternative check:
Vendor docs and examples consistently demonstrate CREATE USER before GRANT statements, confirming this is the correct command to establish an account.
Why Other Options Are Wrong:
Common Pitfalls:
Confusing CREATE USER with CREATE ROLE (some systems treat users as roles); mixing server logins with database users (e.g., SQL Server).
Final Answer:
CREATE USER
Discussion & Comments