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

18th Jan 2022, 3:47 PM
Muhammad Shamsuddeen Zakariyya
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
18th Jan 2022, 4:05 PM
Simba
Simba - avatar
0
See field spelling in 'ON' line
18th Jan 2022, 4:40 PM
Emerson Prado
Emerson Prado - avatar