SQL Fundamental. Anyone help me please. I have tried to run this code, but the code that I created incorrect (not error) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

SQL Fundamental. Anyone help me please. I have tried to run this code, but the code that I created incorrect (not error)

INSERT INTO Animals VALUES ('Slim', 'Giraffe', 1); SELECT Animals.name, Animals.type, Countries.country FROM Animals INNER JOIN Countries ON Animals.country_id=Countries.id ORDER BY country ASC ;

12th Feb 2021, 5:59 PM
Yuniar Egi Prasasti
6 Answers
+ 7
INSERT INTO Animals (name, type, country_id) VALUES ('Slim', 'Giraffe', 1); SELECT animals.name, animals.type, countries.country FROM animals, countries WHERE animals.country_id=countries.id order by animals.country_id desc
13th Feb 2021, 9:38 AM
Ramnivas Yadav
Ramnivas Yadav - avatar
13th Feb 2021, 9:35 AM
Yuniar Egi Prasasti
+ 2
try adding Countries.country instead of just country after ORDER BY..
12th Feb 2021, 6:52 PM
NaSaPaKri
NaSaPaKri - avatar
+ 2
Thank you, I also have tried that and the result is stil incorrect
12th Feb 2021, 6:55 PM
Yuniar Egi Prasasti
+ 2
don't worry, it's a bug.... i tried doing other module projects nothing is running.... no input no output...
12th Feb 2021, 6:59 PM
NaSaPaKri
NaSaPaKri - avatar
+ 2
yes, that's happened to my code, this is not an error but it can't be executed. I'm curious
12th Feb 2021, 7:07 PM
Yuniar Egi Prasasti