0
What is wrong vth thz quiery
/* name - "Slim", type - "Giraffe", country_id - 1 */ INSERT INTO Animals(name,type,country_id) VALUES ("Slim","Giraffe",1); SELECT * FROM Animals,Countries WHERE Animals.country_id=Countries.id;
7 Respostas
+ 4
We can't do SELECT * on multiple tables. You might need to use JOIN for selecting columns from multiple tables.
https://www.sololearn.com/learn/SQL/1865/?ref=app
Also, we usually use single quotes for string/date values in INSERT UPDATE operation etc.
VALUES( 'Slim', 'Giraffe', 1 )
+ 2
Please refer to the link on how to join tables, you are still not using JOIN in the query.
+ 2
I can, but I'm sure you can get through this once you learned how to join tables. And you'd be progressing ahead by learning.
If you still can't solve this, I suggest you to search the forum. Someone must have tried and solved it earlier đ
P.S. Also fix the double quotes in INSERT statement.
+ 2
Good job! đ
And here are some previous discussion over this topic.
https://www.sololearn.com/Discuss/2785990/?ref=app
https://www.sololearn.com/Discuss/2771912/?ref=app
+ 1
/* name - "Slim", type - "Giraffe", country_id - 1 */
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;
Still not working
+ 1
Done now it's working
0
Can u edit it plzz?