Cyber Monday 2024! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Oracle Exam 1Z0-071 Topic 12 Question 102 Discussion

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

Examine this statement:

SELECT 1 AS id, ' John' AS first name

FROM DUAL

UNION

SELECT 1 , ' John' AS name

FROM DUAL

ORDER BY 1;

What is returned upon execution?

Show Suggested Answer Hide Answer
Suggested Answer: C

Contribute your Thoughts:

Otis
2 months ago
I love these SQL questions! Okay, let me think this through... The UNION operation will combine the results of the two SELECT statements, and the ORDER BY 1 will sort the results based on the first column. Since the first column is an alias for the number 1, I think the correct answer is option D - 2 rows.
upvoted 0 times
Haydee
5 days ago
Let's see the correct answer together.
upvoted 0 times
...
Delfina
6 days ago
I'm not sure, but I think it's option D - 2 rows.
upvoted 0 times
...
Hyun
8 days ago
I think it might be option C - 1 row.
upvoted 0 times
...
Lavonna
1 months ago
I agree with you, option D seems correct.
upvoted 0 times
...
...
Leah
2 months ago
What kind of a question is this? Who cares about SELECT statements from DUAL tables? I'm just going to choose option B and hope for the best. Maybe the question is trying to trick us or something.
upvoted 0 times
...
Nakisha
2 months ago
This is tricky, but I'm going to go with option D. The first SELECT statement has a column alias of 'first name', while the second SELECT statement has a column alias of 'name'. I think the ORDER BY 1 will sort the results based on the first column, which should give us 2 rows.
upvoted 0 times
Lakeesha
24 days ago
Yes, that's correct. The different column aliases will result in 2 rows being returned.
upvoted 0 times
...
Broderick
1 months ago
I agree, the ORDER BY 1 will sort based on the first column, giving us 2 rows.
upvoted 0 times
...
Leota
1 months ago
I think it will return 2 rows because of the different column aliases in the SELECT statements.
upvoted 0 times
...
...
Stephen
2 months ago
I'm not sure, but I think it might be D) 2 rows because there are two SELECT statements.
upvoted 0 times
...
Jeannetta
2 months ago
I agree with Sylvie, the ORDER BY 1 will return 1 row with id 1 and name 'John'.
upvoted 0 times
...
Sylvie
2 months ago
I think the answer is C) 1 row because both SELECT statements have the same values.
upvoted 0 times
...
Dannie
3 months ago
Hmm, I think this is going to return 2 rows. The first SELECT statement and the second SELECT statement are both selecting data from the DUAL table and concatenating the results using UNION, so I expect to see two rows.
upvoted 0 times
Chantay
1 months ago
I'm not sure, but I think it will return 1 row because the first SELECT statement has 'id' and the second SELECT statement has 'name'.
upvoted 0 times
...
Shonda
1 months ago
I believe it will return 2 rows as well, since each SELECT statement is returning a row and the UNION combines them.
upvoted 0 times
...
Dalene
1 months ago
I think it will return 1 row because the first SELECT statement has an alias 'id' and the second SELECT statement has an alias 'name', so they are not the same.
upvoted 0 times
...
Michell
1 months ago
I agree, it should return 2 rows since we are selecting data from two different SELECT statements.
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