Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
什么是列出数据库中所有视图的 H2 命令?
我预计该SHOW 命令会完成这项工作,但没有列出视图的选项。
SHOW
这些在information_schema中列出
所以,你需要运行:
select * from information_schema.views;
请检查INFORMATION_SCHEMA 模式下为 H2 数据库引擎提供的系统表
您可以通过查询 INFORMATION_SCHEMA.VIEWS 系统表来显示所有视图
试试这个,它应该可以工作。
SELECT TABLE_NAME as [View Name] FROM INFORMATION_SCHEMA.VIEWS
H2 数据库