都知道Android中数据保存之一就是使用了sqlLite,所以经常创建表需要涉及到数据库字段。
sqlLite中包含5中字段,根据下面的介绍对于想inte,应该会根据值自动设置长度存储。具体待学习
Each value stored in an sqlite database (or manipulated by the database engine) has one of the following storage classes:
-
NULL. The value is a NULL value.
-
INTEGER. The value is a signed integer,stored in 1,2,3,4,6,or 8 bytes depending on the magnitude of the value.
-
REAL. The value is a floating point value,stored as an 8-byte IEEE floating point number.
-
TEXT. The value is a text string,stored using the database encoding (UTF-8,UTF-16BE or UTF-16LE).
-
BLOB. The value is a blob of data,stored exactly as it was input.
参考:
http://www.sqlite.org/datatype3.html
http://kuikui.iteye.com/blog/423490
http://developers.androidcn.com/reference/android/database/sqlite/package-summary.html
原文链接:https://www.f2er.com/sqlite/200853.html