0
Why is this code giving me error? Any one help please
INSERT INTO Animals VALUES ("Slim", "Giraffe", 1); SELECT Animals.name, Animals.type, Countries.country FROM Animals, Countries WHERE Animals.country_id=Countries.id ORDER BY Countries.country; This code gives the error column slim does not exist, I don't understand. The code is to add "slim" under column "name", the table Animals has 3 columns, name, type and Id. How else should I have written it? BTW, this code works in online editor
3 Answers
+ 2
I've solved it. The problem was the double quotations " "
I used single quotes and it worked ' '
Thanks everyone
0
Replace on obvious inner join
0
The part giving the error is the insert area, the other part works. The exercise is to add the line to the table Animals, and then return the two tables joined. The where statement is an inner join as is used here already