ITPEC FE Subject A April 2026 Question 22
ITPEC FE Subject A April 2026 — Question 22 of 60
The pattern 'A%' anchors the literal at the start and lets % absorb the rest.
In SQL pattern matching:
- •
%matches any sequence of characters, including none - •
_matches exactly one character
So 'A%' means "begins with A, followed by anything".
Answer (d): SELECT all FROM Student WHERE name LIKE 'A%'
Why not others:
- (a) '%A' — matches names that end with A
- (b) '%A_' — matches names where A is the second-to-last character
- (c) 'A_' — matches only two-character names beginning with A, because _ demands exactly one more character
Key rule: The position of % decides the anchor: leading % means "ends with", trailing % means "starts with". Use _ only when the number of characters is fixed.
AI-generated — may contain errors
The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.
This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.