I am trying to insert a string "02" into a string column. I can very clearly see that "02" is being issued as the command "REPLACE INTO Users (ID, Terminal) values ('00000000001', '02')". However when it is placed in the database it is entered as seemingly an integer (removing the leading zero) and then causes an error when reading it in as a string.
The extremely confusing part is that the ID string works (perhaps because the column is (ID VARCHAR(11) NOT NULL) while Terminal is a string? I know that if the column were set to integer this behaviour would make sense but I have set the column to a string and I can see in the schema it is one. I feel like I must be missing something obvious but I can't spot it.
String is converted to integer in string column while I am definitely entering it as a string and am definitely entering it into a string column. The only way I can seemingly get this to work is to add an alpha character into the string and it will be inserted properly which I'll have to remove when retrieving but that seems like a poor solution just to get the type correct.


