+ 2
Question on the Zoo Project from the SQL course
I am trying to solve the Zoo project. I get the message "syntax error at or near "Select" Here is my code: INSERT INTO Animals (name, type, country_id) VALUES('Slim','Giraffe', 1) SELECT Animals.name, Animals.type, Countries.country AS country FROM Animals, Countries WHERE Animals.country_id=Countries.id ORDER BY Countries.id DESC; Please help
2 odpowiedzi
+ 5
Your solution seems logic, I think the problem is u missing a semicolon at the end of the insert statement.
Tips: If u have multiple statements, seperate them with semicolons. The query will execute once it encounter semicolon.
+ 1
Thank you!