1Z0-888 · Question #86
You want to dump only data from the userdata table. Which mysqldump command argument is required to accomplish this?
The correct answer is B. --single-transaction this obtains a consistent view of data only. There appears to be an error in this answer key. The marked answer B (--single-transaction) is incorrect for the stated goal. The actual correct answer is A: --no-create-info. Here's why: A (--no-create-info) is actually correct - it suppresses the CREATE TABLE statements from…
Question
Options
- A--no-create-info to skip writing CREATE TABLE statements
- B--single-transaction this obtains a consistent view of data only
- C--data-only as this specifies that only data is to be dumped
- D--table=userdata in order to dump only the data from the userdata table
How the community answered
(26 responses)- B88% (23)
- C8% (2)
- D4% (1)
Explanation
There appears to be an error in this answer key. The marked answer B (--single-transaction) is incorrect for the stated goal.
The actual correct answer is A: --no-create-info.
Here's why:
-
A (
--no-create-info) is actually correct - it suppresses theCREATE TABLEstatements from the dump, leaving only theINSERTdata statements. This is the standard mysqldump flag for a data-only dump. -
B (
--single-transaction) is wrong for this goal - it wraps the dump in a transaction to ensure a consistent read snapshot (important for InnoDB), but it has nothing to do with excluding schema definitions. It would still dump both CREATE TABLE and data. -
C (
--data-only) is wrong - this flag does not exist in mysqldump. -
D (
--table=userdata) is wrong - the correct syntax is--tables userdata(plural), and it specifies which table to include, not whether to dump data only. It would still include the CREATE TABLE statement unless combined with--no-create-info.
Memory tip: Think of --no-create-info as "no schema creation info" - strip the structure, keep the data. Pair it with --tables to target a specific table: mysqldump --no-create-info --tables userdata.
I'd recommend flagging this question if it's from an official source, as the answer key is factually incorrect.
Topics
Community Discussion
No community discussion yet for this question.