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
2 odpowiedzi
+ 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 ;
- 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;