Databases Querying Relational Databases Set Operations Union All Operations

Claire Brehm
Claire Brehm
9,098 Points

Having trouble with question 3

My code is

SELECT name FROM fruit UNION ALL SELECT name FROM vegetable ORDER BY name DESC;

prompt is There are two tables Fruit and Vegetable table. The Fruit table has a FruitID and a Name column and the Vegetable table has a VegetableID and Name column.

Create a list of fruits and vegetables that includes any potential duplicate values. Ensure that it is in alphabetical order so that the duplicates are next to each other!

Thanks in advance!

1 Answer

54,332 Points

The instructions include "Ensure that it is in alphabetical order" so you wouldn't use DESC.