esp32-idf-sqlite3 icon indicating copy to clipboard operation
esp32-idf-sqlite3 copied to clipboard

INSERT multiple rows in a statement results on last item only

Open alessandroraffa opened this issue 5 years ago • 5 comments

Platform: esp-idf 3.3-beta1-506-gebdcbe8c6-dirty

Using either one of the following statements:

INSERT INTO tableName (value) 
VALUES (12.00),(24.00),(36.00),(48.00),(60.00),(72.00),(84.00),(96.00);
INSERT INTO tableName (value) 
SELECT (12.00) 
UNION ALL SELECT (24.00) 
UNION ALL SELECT (36.00)
UNION ALL SELECT (48.00)
UNION ALL SELECT (60.00) 
UNION ALL SELECT (72.00) 
UNION ALL SELECT (84.00) 
UNION ALL SELECT (96.00);

Results in only the last row 96.00 actually in the database.

Is there any known issue or am I doing something wrong?

Thanks in advance.

alessandroraffa avatar Dec 11 '19 11:12 alessandroraffa

I have been having exactly the same problem. Any updates?

julliermedias avatar Nov 27 '20 18:11 julliermedias

I tried this on my side with the same result. I don't have an answer at this time. Why not just run multiple insert statements or use a Prepared statement?

siara-cc avatar Dec 19 '20 14:12 siara-cc