The "sample" table consists of the following data: How many rows are returned by executing the following SQL statement? SELECT * FROM sample WHERE v ~ 'ab';
Suggested Answer: C
Get Premium PGCES-02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
21 comments · newest first
TU
Tula
1 day ago
I think it's A) 0 rows. No matches.
RO
Roslyn
6 days ago
I agree with A) 0 rows. The pattern might not exist.
RO
Rolf
11 days ago
I’m going with E) 4 rows. Why not?
FA
Fatima
17 days ago
I vote for D) 3 rows. More likely to have multiple hits.
LA
Lakeesha
22 days ago
I feel like it’s C) 2 rows. Seems reasonable.
PA
Pansy
27 days ago
I’m leaning towards B) 1 row. Could be a single match.
GA
Gail
1 month ago
I think it's A) 0 rows. No matches.
CA
Candida
1 month ago
Yeah, I agree with Cherry, at least 1 row for sure!
TY
Tyra
1 month ago
Wait, how can we be sure? What if there are no matches?
LE
Leonida
2 months ago
I’m leaning towards 2 rows based on my last run.
CH
Cherry
2 months ago
Definitely not 0 rows, there must be at least 1 match.
NE
Nettie
2 months ago
I think it depends on the data in the "sample" table.
ME
Merilyn
2 months ago
Wait, are you sure it even matches anything?
LO
Lonna
2 months ago
I agree, 1 row sounds about right.
AN
Andra
2 months ago
No way it's 4 rows, that seems too high!
MU
Muriel
3 months ago
I'm pretty sure it's 2 rows based on the regex match.
LI
Lisandra
3 months ago
I think it depends on the actual data in the "sample" table.
VE
Verdell
3 months ago
I remember something about how the regex can match multiple occurrences, but I can't recall the exact data. I'm leaning towards 1 row.
VE
Velda
3 months ago
I'm not entirely sure, but I think if 'ab' appears in any of the values, it could return multiple rows. Could it be 3?
MA
Margery
3 months ago
I feel like we practiced a similar question in class, and it was about counting rows with specific patterns. Maybe it's 2 rows?
KA
Kate
3 months ago
I think the regex operator `~` is used for pattern matching, but I can't remember how it works with the data in the table.