I create a database in language R using package RSQLite with the following code.
con <- dbConnect(RSQLite::SQLite(), "TEST.db")
dbSendQuery(con, "CREATE TABLE TabA (C1 INTEGER NOT NULL, C2 INTEGER NOT NULL, C3 REAL, PRIMARY KEY (C1))")
dbSendQuery(con, "INSERT INTO TabA (C2,C3) VALUES (2.6,2.6)")
dbGetQuery(con, "SELECT * FROM TabA")
dbDisconnect(con)
I define a column C2 with datatype integer and C3 with datatype double. Now I expect the following values in my Database:
C1 C2 C3
1 1 3 2.6
But my query gives the following result:
C1 C2 C3
1 1 2.6 2.6
The defined datatypes are ignored totaly. What's the bug in my program?
Thanks