Difficulty: Easy
Correct Answer: Incorrect
Explanation:
Introduction / Context:
SQL groups statements into categories with different purposes. Confusing these categories can lead to permission errors and incorrect assumptions about transactional behavior. This question examines whether DML is responsible for defining database structures.
Given Data / Assumptions:
Concept / Approach:
DML manipulates the contents of existing tables and views—reading and changing rows. DDL defines or changes schema objects—creating tables, indexes, views, constraints, and altering or dropping them. Therefore, the statement that DML is used to “define” a database is incorrect: defining is DDL’s job. Some databases allow DDL within transactions (with varying behaviors), but that does not change the category definitions.
Step-by-Step Solution:
Verification / Alternative check:
Check role privileges: DDL usually requires higher privileges than DML; DBAs often separate these responsibilities.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming GRANT/REVOKE for DDL equals DML privileges; expecting DDL to be fully transactional in engines that auto-commit DDL.
Final Answer:
Incorrect
Discussion & Comments