exam questions

Exam Professional Cloud Developer All Questions

View all questions & answers for the Professional Cloud Developer exam

Exam Professional Cloud Developer topic 1 question 8 discussion

Actual exam question from Google's Professional Cloud Developer
Question #: 8
Topic #: 1
[All Professional Cloud Developer Questions]

You have two tables in an ANSI-SQL compliant database with identical columns that you need to quickly combine into a single table, removing duplicate rows from the result set.
What should you do?

  • A. Use the JOIN operator in SQL to combine the tables.
  • B. Use nested WITH statements to combine the tables.
  • C. Use the UNION operator in SQL to combine the tables.
  • D. Use the UNION ALL operator in SQL to combine the tables.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️
Reference:
https://www.techonthenet.com/sql/union_all.php

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
saurabh1805
Highly Voted 3 years, 5 months ago
C is correct answer here. The only difference between Union and Union All is that Union All will not removes duplicate rows or records, instead, it just selects all the rows from all the tables which meets the conditions of your specifics query and combines them into the result table.
upvoted 7 times
...
__rajan__
Most Recent 7 months, 1 week ago
Selected Answer: C
C is correct.
upvoted 1 times
...
ash_meharun
1 year, 4 months ago
UNION removes duplicate rows. UNION ALL does not remove duplicate rows.
upvoted 3 times
...
tomato123
1 year, 8 months ago
Selected Answer: C
C is correct
upvoted 1 times
...
wilwong
2 years, 9 months ago
C is correct
upvoted 1 times
...
syu31svc
2 years, 10 months ago
If you know SQL well enough, C is the answer
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago