首页 > 解决方案 > SQLite - 选择我的行,但它们不显示/空 sqlite 行

问题描述

作为 Visual Studio 扩展,我在当前版本 4.7.632 中使用SQL Server Compact Toolbox 。我对我的 SQLite 数据库的简单查询有问题。我通过我的扩展程序的 SQLite 浏览器开始查询。

第一个查询:

SELECT * FROM [statistics]

Id articlename category
1  article-1   A
2  article-2   B
3  article-3   C

(3 rows found)

第二个查询:

SELECT id, articlename, category FROM [statistics]

Id articlename category
1  article-1
2  article-2
3  article-3

(3 rows found)

找到了我的第二列“类别”,但在此查询中留空。只有在我的查询中明确列出两列(文章名称和类别)而不是 * 时,我才会遇到这种情况。

第三个查询:

SELECT id, category FROM [statistics]

Id category
1
2
3

(3 rows found)

为什么没有为我的类别显示值?该列在我的数据库中创建为“文本,非空”。和我文章的专栏一样。

标签: sqllinqsqlite

解决方案


我现在使用了另一个 SQL 浏览器,在这里我正确显示了列 - 交换了两个字段。奇怪的是我的 VS Add-On SQL Server Compact Toolbox正确显示了该列。

非常感谢你的帮助。我可以向你推荐这个 SQLite 浏览器https://sqlitebrowser.org/

我可以告诉您通过 VS 的独立工具另外查看表格 :)


推荐阅读