在SQLite中仅显示VIEWS

时间:2012-02-28 09:38:26

标签: sqlite views show

我怎样才能在SQLite中看到VIEWS。

.tables 命令列出了视图和表格。我想只看到VIEWS,而不是表格。

感谢。

1 个答案:

答案 0 :(得分:6)

你可以这样做:

SELECT sql FROM sqlite_master WHERE type = 'view';

为了微调它:

.headers on
select * from sqlite_master;

你会知道哪些列可用。