MySQL 1Z0-909 sample questions with explanations, traps, topic labels, and IT Mastery route links.
These original sample questions are designed to help you check how the exam topics appear in decision-style prompts. They are not taken from the live exam.
Use these sample questions as a guided self-assessment for Oracle MySQL 8.0 Database Developer (1Z0-909) topics such as SQL correctness, joins, grouping, indexes, transactions, stored programs, JSON usage, and schema-design tradeoffs. The strongest answers usually come from tracing rows and constraints before choosing the query that looks familiar.
The sample set below is part of the Oracle MySQL 1Z0-909 guide path:
Work through each prompt before opening the explanation. For MySQL developer questions, check SQL legality, row shape, and transaction behavior before trusting an answer that sounds convenient.
Topic: Preserving unmatched parent rows
A report must list every customer, including customers who have not placed an order. For customers with orders, it should show the order count. Which query shape best preserves customers with zero orders?
INNER JOIN from customers to orders and group by customer.LEFT JOIN from customers to orders and count a non-null order column.customer_id.RIGHT JOIN from customers to orders and filter out null customer names.Best answer: B
Explanation: The preserved table is customers, so the query should start from customers and left join matching orders. Counting a non-null order column returns zero for customers with no matching order rows.
Why the other choices are weaker:
What this tests: Join direction, null-extended rows, grouping, and aggregate-count behavior.
Related topics: LEFT JOIN; Aggregation; COUNT; Report queries
Topic: Keeping a predicate sargable
A table has an index on created_at. A query must return rows from April 2026. Which predicate is most likely to let MySQL use the index efficiently?
WHERE DATE_FORMAT(created_at, '%Y-%m') = '2026-04'WHERE MONTH(created_at) = 4 AND YEAR(created_at) = 2026WHERE created_at LIKE '2026-04%'WHERE created_at >= '2026-04-01' AND created_at < '2026-05-01'Best answer: D
Explanation: A half-open range keeps the indexed column unwrapped and expresses the exact time window. That gives the optimizer a clean range predicate on created_at.
Why the other choices are weaker:
What this tests: Sargable predicates, date filtering, and index-aware query design.
Related topics: Indexes; Sargability; Date ranges; Optimizer
Topic: Choosing the right transaction boundary
An application transfers funds between two accounts by subtracting from one row and adding to another. The operation must never leave only one side of the transfer committed. Which approach is strongest?
Best answer: A
Explanation: The two updates form one logical unit of work. A transaction gives the application all-or-nothing behavior, so a failure can roll back both changes instead of committing a partial transfer.
Why the other choices are weaker:
What this tests: Transaction atomicity and choosing commit boundaries for multi-step changes.
Related topics: Transactions; Atomicity; COMMIT; ROLLBACK
Topic: JSON value extraction
A table stores product attributes in a JSON column named details. A query needs the scalar color value at $.color as text so it can be displayed without JSON quotes. Which expression is the cleanest fit?
JSON_OBJECT(details, '$.color')JSON_ARRAY(details->'$.color')details->'$.color'details->>'$.color'Best answer: D
Explanation: In MySQL, -> returns a JSON value, while ->> returns an unquoted scalar text value. The prompt explicitly asks for display text without JSON quotes.
Why the other choices are weaker:
What this tests: MySQL JSON path extraction and the difference between JSON and unquoted scalar output.
Related topics: JSON; Path extraction; Scalar values; SQL expressions
Tech Exam Lexicon and IT Mastery are independent study tools. They are not affiliated with, endorsed by, or sponsored by Oracle or any certification body.