SQLite VARCHAR default size

前端 未结 3 1303
暗喜
暗喜 2021-02-06 22:54

In SQLite, when I say:

CREATE TABLE my_table 
(
    my_column VARCHAR 
);

without specifying the size of VARCHAR, what is the defa

相关标签:
3条回答
  • 2021-02-06 23:03

    It doesn't matter.

    SQLite does not use sizes when declaring the VARCHAR type. In fact, it almost doesn't use the type either.

    You can store TEXT in an INT column in SQLite. And SQLite will never truncate a TEXT column.

    0 讨论(0)
  • 2021-02-06 23:17

    From what I can gather, VARCHAR is the same as TEXT

    http://www.sqlite.org/datatype3.html

    Also see http://www.sqlite.org/different.html#flex

    0 讨论(0)
  • 2021-02-06 23:21

    In SQLite, Text is the parent of VARCHAR and in the default installation is no different http://www.sqlite.org/datatype3.html.

    0 讨论(0)
提交回复
热议问题