+ 1

Error a task INSERT

вывод выдает правильный, но не засчитывает решение задачи INSERT INTO Garage (id, make, model, prodyear) VALUES (6, 'Mercedes-Benz', G 63, 2020), (7, 'Porcshe', 'Panamera', 2020); SELECT * from Garage; В синтаксисе ошибка?

1st Mar 2021, 8:40 PM
Vasily Bylin
2 Antworten
+ 1
Is id auto increment field (set automatic at insert) or does the value of id alread exist in the database (6 and/or 7)? The latter would be an issue if id is set to unique.
1st Mar 2021, 11:27 PM
Paul K Sadler
Paul K Sadler - avatar
0
INSERT INTO Garage (id, make, model, prodyear) VALUES (6, 'Mercedes-Benz', 'G 63', 2020); INSERT INTO Garage (id, make, model, prodyear) VALUES (7, 'Porsche', 'Panamera', 2020); SELECT * FROM Garage;
11th Apr 2021, 5:33 PM
Allan Stocco Rezende
Allan Stocco Rezende - avatar