0

Could anyone make correct codes for the quiz 28 'zoo', SQL course?

I've been trying so hard to write correct codes for the question. But they keep me telling that syntax is wrong. If anyone got correct codes, could you share it with me? My writing was: insert into Animals values('Slim', 'Giraffe', 1) SELECT Animals.name, Animals.type, Countries.country FROM Animals INNER JOIN Countries ON Countries.id = Animals.country_id ORDER BY Countries.country

20th Nov 2021, 11:03 PM
Hiromi Ishikawa
2 ответов
+ 1
You need to say the name of the columns after insert into. Try this: INSERT INTO Animals (name, type, country_id) Also on the end of your code after country add a semicolon ;
20th Nov 2021, 11:43 PM
Lebi
- 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.country_id = Countries.id Order by Countries.country;
25th Jul 2022, 4:36 AM
Alexander Le
Alexander Le - avatar