0

My code is not liking my INSERT INTO syntax

SELECT a.name, a.type, a.country_id, c.id FROM Animals a, countries c WHERE c.id=a.country_id ORDER BY country_id INSERT INTO Animals a (a.name, a.type, a.country_id) VALUES ('Slim', 'Giraffe',1)

23rd Aug 2021, 6:47 PM
Martin
2 Antworten
0
Sorted it, long winded if you ask me INSERT INTO Animals (name, type, country_id) VALUES ('Slim', 'Giraffe',1); SELECT Animals.name, Animals.type, countries.country FROM Animals, countries WHERE countries.id=Animals.country_id ORDER BY Animals.country_id desc
23rd Aug 2021, 7:32 PM
Martin
0
My code is not liking my INSERT INTO syntax INSERT INTO Animals (name, .type, country_id) VALUES ('Slim', 'Giraffe',1) SELECT a.name, a.type, c.id FROM Animals a, countries c WHERE c.id=a.country_id ORDER BY a.country_id
23rd Aug 2021, 7:24 PM
Martin