How can you inspect the stored type of an imported value?

typeof reports a value's storage class, distinguishing integer, real, text, blob and null.

SQLite example and interpretation

Text 01 and integer one can look similar in a UI. Inspect the type before aggregating, especially for account codes with significant leading zeros.

SELECT typeof('01'),typeof(1),typeof(1.0);

Result [["text", "integer", "real"]]

中文

导入样本后怎样检查实际存储类型?

typeof 报告值的存储类,可识别 integer、real、text、blob 和 null。

SQLite 示例与适用条件

字符串 01 和整数 1 在界面上容易混淆。先检查类型再判断是否适合做数值聚合,尤其是带前导零的账户编码。

SELECT typeof('01'),typeof(1),typeof(1.0);

结果 [["text", "integer", "real"]]

References / 参考来源

Keep reading / 继续阅读