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)
2 Réponses
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
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