0
What is wrong with this code
/* name - "Slim", type - "Giraffe", country_id - 1 */ INSERT into Animals (name, type,country_id) VALUES ( 'Slim' , 'Giraffe' , 1) ; SELECT Animals . name, Animals . type ,countries.country FROM Animals inner join countries ON Animals . counry_id= countries. id order by countries .countries . country
2 Answers
+ 4
After adding a new animal(Giraffe), you need to rename existing columns using `AS` keyword.
Animals.name as name, Animals.type as type....
Also, country_id
order by country
0
See field spelling in 'ON' line