A set of tables are defined as follows: t1 t2 How many rows are returned by executing the following SQL statement? SELECT * FROM t1 LEFT OUTER JOIN t2 USING (id);
Suggested Answer: A, E
Get Premium PGCES-02 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
31 comments · newest first
RE
Renea
10 months ago
I vote for 4 rows, seems like a safe bet!
VE
Veronika
11 months ago
Wait, are we sure about that? What if t2 has no matches?
LE
Leanora
11 months ago
I’m pretty sure it’s 3 rows if t1 has 3 and t2 has 2 matching IDs.
SK
Skye
11 months ago
Definitely! A LEFT JOIN will return all rows from t1.
EZ
Ezekiel
11 months ago
I think it depends on the number of matching IDs in t1 and t2.
SU
Susy
12 months ago
I’m leaning towards option B, but I feel like I might be mixing up the concepts of INNER JOIN and LEFT JOIN.
LO
Louvenia
12 months ago
If t1 has 3 rows and t2 has 2 matching rows, I believe it would return 3 rows total. But what if there are no matches?
JU
Judy
12 months ago
I think I saw a similar question where the LEFT JOIN returned all rows from the left table, but I can't recall the exact numbers.
KE
Kendra
1 year ago
I remember practicing LEFT OUTER JOINs, but I'm not sure how many rows would actually be returned without knowing the data in t1 and t2.
AN
Angelyn
1 year ago
This is a good example of why it's important to understand how different SQL join types work. I'll make sure to review my notes on that before the exam.
BR
Brittani
1 year ago
I'm a little confused by the USING clause here. Does that mean the 'id' column needs to exist in both tables? I'll have to double-check the table definitions to be sure.
RA
Raina
1 year ago
Okay, let me break this down step-by-step. The LEFT OUTER JOIN will return all rows from the t1 table, plus any matching rows from the t2 table. The USING clause means it will match on the 'id' column. I think I've got this!
NA
Nana
1 year ago
Hmm, I'm a bit unsure about how the LEFT OUTER JOIN with the USING clause will affect the number of rows returned. I'll need to think this through carefully.
CH
Charlesetta
1 year ago
This looks like a pretty straightforward SQL query, so I'm feeling confident I can figure this out.
GA
Gayla
1 year ago
The answer is obviously E) 6 rows. Why? Because the more options, the better the chances of guessing correctly, right? *winks*
KE
Kenny
1 year ago
I'm sticking with E) 6 rows, more options means better chances!
KR
Krystina
1 year ago
No, I'm pretty sure it's 5 rows.
ED
Edelmira
1 year ago
I think the answer is actually 4 rows.
QU
Quentin
1 year ago
Definitely C) 4 rows. I'm so confident about this that I'm already planning my victory dance.
JA
Janine
1 year ago
I believe it's D) 5 rows.
BE
Benton
1 year ago
I agree with C) 4 rows.
VI
Viola
1 year ago
I'm going with B) 3 rows.
AA
Aaron
1 year ago
I think it's A) 2 rows.
SH
Shawnta
1 year ago
Wow, this is a tricky one! I'm going to go with D) 5 rows. Who knows, maybe there's some hidden magic in the database that'll surprise us all.
CA
Carri
1 year ago
I'm pretty sure the answer is B) 3 rows. The LEFT OUTER JOIN will only return the rows where there is a match between the two tables.
NI
Nieves
1 year ago
The correct answer is C) 4 rows. The LEFT OUTER JOIN will return all rows from the t1 table, even if there are no matching rows in the t2 table.
LE
Leanna
1 year ago
Yes, you're right. The LEFT OUTER JOIN will return all rows from t1 table.
AU
Audra
1 year ago
I think it's 4 rows
BU
Buddy
2 years ago
I believe the answer is C) 4 rows, as it includes all rows from t1 and t2.
LU
Luis
2 years ago
I agree with Tijuana, because there are 2 rows in t1 and 1 row in t2.
TI
Tijuana
2 years ago
I think the answer is B) 3 rows.