Troy Erby6,332 Points
Trouble with Set Operations
Here is the challenge question:
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 all fruits and vegetables starting with the letters A through K . In other words all fruit and vegetables that don't start with the letter L to Z.
The code I used as an answer was:
SELECT name FROM fruit UNION SELECT name FROM vegetable WHERE name < "L"
The error message I got back is that my result did not return values for A-K
I apologize if this question is repetitive. I saw that another student posted the same question using the same line of code I did two days ago, but they didn't have a posted answer and I'm running into the same wall
Steven Parker203,270 Points
You're close, but the
UNION combines complete queries. So just as each one has a
SELECT clause and a
FROM, they each also need their own