创建一个表,一个字段长度为 1
CREATE TABLE "main"."aa" ( "t" TEXT(1) ) ;
插入一个长度大于 1 的数据, 为什么会插入成功呢?那么这个字段长度有什么用呢?
INSERT INTO "main"."aa" ("t") VALUES ('adadasdasdasdasdasdasdasdasdasdasdasda')
没啥用,当成注释文档吧
Note that numeric arguments in parentheses that following the type name (ex: "VARCHAR(255)") are ignored by SQLite - SQLite does not impose any length restrictions (other than the large global SQLITE_MAX_LENGTH limit) on the length of strings, BLOBs or numeric values.
https://sqlite.org/datatype3....
1.4m articles
1.4m replys
5 comments
57.0k users