hardMultiple ChoiceObjective-mapped
FC0-U71 Practice Question: A user runs the query: SELECT * FROM Employees…
A user runs the query: SELECT * FROM Employees WHERE Department = 'Sales' AND Salary > 50000; but no rows are returned. The Department column contains 'Sales ' with a trailing space. What is the most likely cause?
⚠ Common exam trap
Many exam-takers assume trailing spaces are automatically ignored in SQL string comparisons, but the FC0-U61 exam tests awareness that exact matches require identical strings, including whitespace.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The data has trailing spaces causing no match
The query uses an exact string comparison with 'Sales', but the stored data contains 'Sales ' (with a trailing space). In SQL, string comparisons are character-by-character, so the trailing space causes the equality check to fail, resulting in zero rows returned. This is a common data quality issue where invisible whitespace prevents matches.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The data has trailing spaces causing no match
Why this is correct
Trailing spaces mean 'Sales' does not equal 'Sales '.
- ✗
The AND operator is incorrect
Why it's wrong here
AND is correct syntax.
- ✗
The column name is misspelled
Why it's wrong here
Column names are correct.
- ✗
Salary is stored as text
Why it's wrong here
Salary comparison works even with implicit conversion, not the cause.
Go deeper
Related to this question
About these practice questions
Courseiva writes every FC0-U71 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on FC0-U71
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Refer to the exhibit. A user runs the query but gets no results, even though there are employees in the Sales department. Which of the following is the most likely cause?
medium- A.The column name is misspelled.
- B.The database is offline.
- ✓ C.The Department values contain trailing spaces.
- D.The table name is incorrect.
Why C: The query likely uses an exact match (e.g., WHERE Department = 'Sales'), but if the Department column contains trailing spaces (e.g., 'Sales '), the string comparison fails because SQL treats trailing spaces as significant in many databases (or the data was padded with spaces). This is a common data integrity issue where imported or manually entered data includes invisible whitespace, causing legitimate rows to be missed.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.