- 1
sql
There are many wolves in the zoo: black wolf, white wolf, lucky wolf, little wolf. They all have 'wolf' at the end of their names. Print the ages of all of the wolves. SELECT age FROM zoo WHERE animal LIKE ' '
3 Respostas
+ 6
This probably came from the tutorials? Now that I look at it, I have a different database design in mind. We're supposed to have a "zoo" entity, a "animal" entity, the "animal_name" and "animal_age" being attributes of the "animal" entity, instead of placing them in "zoo".
Then the statement would be something like:
SELECT animal_age FROM animal WHERE animal_name LIKE '%wolf';
+ 4
Where did you see this?
SELECT age FROM zoo
WHERE animal LIKE '%wolf'
+ 1
%wolf