Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-071 Topic 3 Question 83 Discussion

Actual exam question for Oracle's 1Z0-071 exam
Question #: 83
Topic #: 3
[All 1Z0-071 Questions]

Examine these two queries and their output:

SELECT deptno, dname FROM dept;

SELECT ename, job, deptno FROM emp ORDER BY deptno;

Now examine this query:

SELECT ename, dname

FROM emp CROSS JOIN dept WHERE job = 'MANAGER'

AND dept.deptno IN (10, 20) ;

Show Suggested Answer Hide Answer
Suggested Answer: B

Contribute your Thoughts:

Catalina
1 months ago
Wait, is this a real exam question or a deleted scene from The Office? I feel like Dwight Schrute would nail this one, but only after a lengthy lecture on the finer points of SQL optimization.
upvoted 0 times
Denae
7 days ago
Yeah, it seems like a cross join between the employee and department tables based on the job and department number.
upvoted 0 times
...
Lea
14 days ago
That query looks tricky, but I think it's testing our knowledge of SQL joins.
upvoted 0 times
...
...
Carri
2 months ago
I bet the person who wrote this question just wanted to see if we could spot the CROSS JOIN trap. Nice try, but I'm on to you! D) 12 is the right answer.
upvoted 0 times
Lucille
3 days ago
I almost fell for it, but then I remembered to watch out for CROSS JOIN. D) 12 is the answer.
upvoted 0 times
...
Farrah
4 days ago
I got caught in that trap too, but now I know better. D) 12 is the right choice.
upvoted 0 times
...
Corazon
9 days ago
I agree, it's definitely a CROSS JOIN trap. D) 12 is the correct answer.
upvoted 0 times
...
...
Renay
2 months ago
Hmm, the CROSS JOIN looks a bit suspicious to me. I wonder if there's a more efficient way to get the same result without generating a Cartesian product first. But I guess the answer is still D) 12.
upvoted 0 times
Dannette
1 months ago
Yeah, the CROSS JOIN does seem unnecessary, but D) 12 is still the correct answer.
upvoted 0 times
...
Vallie
1 months ago
I think you're right, the answer is D) 12.
upvoted 0 times
...
Launa
2 months ago
Yeah, I agree. The CROSS JOIN might not be the most efficient way, but the result is still 12.
upvoted 0 times
...
Queen
2 months ago
I think you're right, the answer is D) 12.
upvoted 0 times
...
...
Yolande
2 months ago
This seems straightforward. The CROSS JOIN will create a result set with all possible combinations of employees and departments, and the WHERE clause will restrict it to only managers in departments 10 and 20. The correct answer is D) 12.
upvoted 0 times
...
Luis
2 months ago
So the correct answer should be C) 3, as there are 3 managers in departments 10 and 20.
upvoted 0 times
...
Abel
2 months ago
The CROSS JOIN between the emp and dept tables will generate a Cartesian product, and the WHERE clause will filter the rows where the job is 'MANAGER' and the department number is 10 or 20. The number of rows in the output should be 12.
upvoted 0 times
Makeda
2 months ago
No, it should definitely be 12 rows.
upvoted 0 times
...
Wilbert
2 months ago
I'm not sure, maybe it's 6 rows?
upvoted 0 times
...
Kimbery
2 months ago
I think it will be 12 rows as well.
upvoted 0 times
...
Laila
2 months ago
The output should be 12 rows.
upvoted 0 times
...
...
Cassandra
3 months ago
I agree, it looks like we need to find the employees with the job title 'MANAGER' in departments 10 or 20.
upvoted 0 times
...
Luis
3 months ago
I think the question is about joining tables based on certain conditions.
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77