+ 2
What is wrong with my query??
Solo learn doesn't accept it /* name - "Slim", type - "Giraffe", country_id - 1 */ 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 Countries.country
4 odpowiedzi
+ 4
Fateme Imani
Query is right
1 - there should be semicolon (;) after insert query
2 - SQL doesn't support double quotes so there should be single quotes for a string value
+ 4
// try this:
insert into Animals (name, type, country_id)
values ('Slim', 'Giraffe', 1);
+ 1
try this too 👇👇👇
INSERT INTO ANIMALS
VALUES ('Slim', 'Giraffe', 1);
SELECT name, type, country
FROM ANIMALS INNER JOIN COUNTRIES
ON ANIMALS.country_id = COUNTRIES.id
ORDER BY country_id DESC
- 1
Yes