Cannot insert row in column
Issue #389
invalid
CREATE TABLE "transactions" ( 'trans_id' INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, 'user_id' INTEGER NOT NULL, 'comp_id' INTEGER NOT NULL, 'shares' INTEGER NOT NULL, 'price' REAL NOT NULL, 'time' DATETIME NOT NULL);
I attached the error message and the code I typed in to create rows in the transactions table.
Comments (4)
-
repo owner -
repo owner - removed milestone
- changed version to 1.9.7
-
repo owner Issue
#390was marked as a duplicate of this issue. -
repo owner - changed status to invalid
Probably not a bug, missing feedback
- Log in to comment
You are trying to add a row (not column) to the table transactions? What values are you trying? In the column
trans_id
, you need to enter an integer value, everything else will fail. SQlite is not strictly typed, you can normally pass strings intoINTEGER
columns. But columns defined asINTEGER PRIMARY KEY
will become ROWID-columns and thus, you can only pass integers into them. All other columns oftransactions
areNOT NULL
, so you need to enter some value and cannot leave any of them blank.