Inserting a number as a String into a Text column and SQLite stills removes the leading zero

前端 未结 2 1919
一个人的身影
一个人的身影 2021-01-17 16:27

I got the following number as a string: String numberString = \"079674839\";

When I insert this number into a SQLite DB, SQLite automatically removes the leading zer

2条回答
  •  遇见更好的自我
    2021-01-17 17:01

    Use single quotes around the number, (i.e., '079674839') if it is anywhere in inline sql code. Also, if you're doing this programatically, make sure that you are not going through a numeric conversion.

提交回复
热议问题