Hey all my assignment was to list the names of all animals that do not eat dog food.
Here's what I have:
The problem is that some animals eat dog food as well as other things. So when they eat dog food the animal name (A_Name) doesn't show up but the times they eat other food they do show up.Code:select A.A_Name from Animal A inner join AnimalFood AF on A.A_ID = AF.A_ID where AF.Food != 'dog food'
How do I make it so if they ever eat dog food they never show up?
Here's the result of what I get as of now:
So for example, in the database Boy eats dog food so I never want him to show up.Code:Boy Boy Boy Boy Olga Olga Olga Olga Olga Natasha Igor Igor Igor Tatja Tatja Tatja Gaia Gaia