根据 SQLite 3 documentation说它具有“类型亲和性”功能来强制执行列数据类型。但是如何开启呢?
最佳答案
类型亲和性不会强制列数据类型 - 它只是就底层存储引擎如何存储数据提出建议。
在“类型亲和性”部分下:
The type affinity of a column is the recommended type for data stored in that column. The important idea here is that the type is recommended, not required. Any column can still store any type of data.
(强调)
就“如何打开它”而言,没有这样的事情。这就是 SQLite 一直以来的工作方式。要获得此功能,无需打开或关闭任何内容。
关于sqlite - 如何使用 SQLite 3 类型亲和性?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10059500/