0

There are new employees that need to be added to the Employees table. Here is their data: Firstname: Wang Lastname: Lee Sala

this my code INSERT INTO Employees(firstname, lastname, salary) VALUES ("Wang" , "Lee" , 1900), ("Greta" , "Wu" , 1200); SELECT id, firstname, lastname, salary FROM Employees ORDER BY id DESC but it shows this error ERROR: column "Wang" does not exist LINE 3: VALUES ("Wang" , "Lee" , 1900), ^

9th Feb 2023, 6:27 AM
Nipun Deshappriya
Nipun Deshappriya - avatar
6 Antworten
+ 3
Nipun Deshappriya May be typo mistake as error show in line 3 check Wang check again.
9th Feb 2023, 7:14 AM
R🍁🇮🇳
R🍁🇮🇳 - avatar
+ 3
This code does produce result in a SQLite 3.37.0 environment: CREATE TABLE Employees ( id INT PRIMARY KEY, firstname VARCHAR, lastname VARCHAR, salary INT); INSERT INTO Employees (firstname, lastname, salary) VALUES ("Wang", "Lee", 1900), ("Greta", "Wu", 1200); SELECT id, firstname, lastname, salary FROM Employees ORDER BY id DESC;
9th Feb 2023, 10:00 AM
Lochard
Lochard - avatar
+ 2
insert into Employees( firstname, lastname, salary) values ('Wang', 'Lee', 1900), ('Greta', 'Wu', 1200); select id, firstname, lastname, salary from Employees order by id desc;
17th Jan 2024, 7:40 AM
SHUBHAM KARJEE
SHUBHAM KARJEE - avatar
+ 1
insert into Employees( firstname, lastname, salary) values ('Wang', 'Lee', 1900), ('Greta', 'Wu', 1200); select id, firstname, lastname, salary from Employees order by id desc;
13th Sep 2024, 4:14 PM
MUHAMMAD FAIQ
0
no typing errors I double checked
9th Feb 2023, 9:30 AM
Nipun Deshappriya
Nipun Deshappriya - avatar
0
You should put single quotation instead of double quotations. INSERT INTO Employees(firstname, lastname, salary) VALUES ('Wang', 'Lee', 1900), ('Greta', 'Wu', 1200); SELECT id, firstname, lastname, salary FROM Employees ORDER BY id DESC;
16th Oct 2023, 10:01 AM
Elham Khanlari
Elham Khanlari - avatar