Why my query dosen't work (create table task) practice 23.2 vidoe game score | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

Why my query dosen't work (create table task) practice 23.2 vidoe game score

REATE TABLE leaderboard ( place int nickname varchar (100) rating int (3000) ); INSERT into leaderboard VALUES (1, Predator, 9500) INSERT into leaderboard VALUES (2, JohnWar, 9300) INSERT into leaderboard VALUES (3, NightWarrior, 8900) SELECT * leaderboard

2nd Jun 2021, 8:07 AM
讗诇讛 谞讜住讘讗讜诐
讗诇讛 谞讜住讘讗讜诐 - avatar
7 Answers
+ 3
讗诇讛 谞讜住讘讗讜诐 Table creation script is wrong. It should be like this: CREATE TABLE leaderboard ( place INT, nickname VARCHAR, rating INT ); And also while inserting data put string data inside single quotes like: INSERT INTO leaderboard VALUES (1, 'Predator', 9500)
2nd Jun 2021, 9:00 AM
A廷J
A廷J - avatar
+ 2
CREATE TABLE leaderboard ( place INT NOT null, nickname VARCHAR (30) NOT null, rating INT NOT null, PRIMARY KEY (nickname) ); INSERT INTO leaderboard (place,nickname,rating) VALUES (1,'Predator',9500), (2,'JohnWar',9300), (3,'NightWarrior',8900); select * from leaderboard;
18th Aug 2021, 10:53 PM
Richard Diaz
Richard Diaz - avatar
0
Thank you. It still not working The error says ;realtion "leaderboard" dose not exist; on all the insert commands
2nd Jun 2021, 8:45 AM
讗诇讛 谞讜住讘讗讜诐
讗诇讛 谞讜住讘讗讜诐 - avatar
0
And error in the rating line.. did anyone do this practice?
2nd Jun 2021, 8:45 AM
讗诇讛 谞讜住讘讗讜诐
讗诇讛 谞讜住讘讗讜诐 - avatar
0
create table leaderboard ( place int, nickname varchar, rating int ); insert into leaderboard (place, nickname, rating) values (1, 'Predator', 9500), (2, 'JohnWar', 9300), (3, 'NightWarrior', 8900); select * from leaderboard;
1st Oct 2021, 9:17 PM
Vibhav Pawar
Vibhav Pawar - avatar
- 1
讗诇讛 谞讜住讘讗讜诐 CREATE TABLE leaderboard ( place integer, nickname varchar (100), rating integer (3000) ); INSERT into leaderboard VALUES (1, Predator, 9500); INSERT into leaderboard VALUES (2, JohnWar, 9300); INSERT into leaderboard VALUES (3, NightWarrior, 8900); SELECT * FROM leaderboard;
2nd Jun 2021, 8:14 AM
藴鈥*掳鈥.藴鈥*掳鈥 Mohan 333 鈥⒙*鈥澦.鈥⒙*鈥澦
藴鈥*掳鈥.藴鈥*掳鈥 Mohan 333 鈥⒙*鈥澦.鈥⒙*鈥澦 - avatar
- 1
CREATE TABLE leaderboard ( place int, nickname varchar (128), rating int); INSERT into leaderboard (Place, NickName, Rating) VALUES (1, 'Predator', 9500), (2, 'JohnWar', 9300), (3, 'NightWarrior', 8900); SELECT * FROM leaderboard;
21st Apr 2022, 3:47 AM
Rocio Eunisse Solorzano Marroquin
Rocio Eunisse Solorzano Marroquin - avatar