nerdexam
CompTIACompTIA

DS0-001 · Question #118

DS0-001 Question #118: Real Exam Question with Answer & Explanation

The correct answer is C: An exact match is not possible in a SELECT statement.. Option C is correct because wildcards (% and _ in SQL) are used with the LIKE operator in the WHERE clause of SELECT statements precisely when an exact match isn't possible or known - for example, WHERE last_name LIKE 'Sm%' retrieves any name starting with "Sm" without knowing th

Question

Which of the following best describes the function of a wildcard in the WHERE clause?

Options

  • AAn exact match is not possible in a CREATE statement.
  • BAn exact match is necessary in a statement.
  • CAn exact match is not possible in a SELECT statement.
  • DAn exact match is necessary in a CREATE statement.

Explanation

Option C is correct because wildcards (% and _ in SQL) are used with the LIKE operator in the WHERE clause of SELECT statements precisely when an exact match isn't possible or known - for example, WHERE last_name LIKE 'Sm%' retrieves any name starting with "Sm" without knowing the full value.

Why the distractors are wrong:

  • A & D both mention CREATE statements, which are DDL commands used to define database objects (tables, indexes, etc.) - wildcards in a WHERE clause have no relationship to CREATE.
  • B states an exact match is necessary, which is the opposite of the truth - wildcards exist specifically to handle imprecise, partial-match scenarios.

Memory tip: Associate wildcards with SELECT + LIKE = "I don't know exactly". Whenever you're searching (SELECT) but can only describe part of the value, that's your cue to use a wildcard. CREATE never searches data, so it never needs one.

Community Discussion

No community discussion yet for this question.

Full DS0-001 PracticeBrowse All DS0-001 Questions