Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

H2 database: How to list all views?

What is a H2 command to list all views in the database?

I have expected that SHOW command would do the job but there is no option there to list views.

like image 857
tomto Avatar asked Oct 23 '25 06:10

tomto


2 Answers

These are listed in the information_schema

So, you need to run:

select *
from information_schema.views;

please check System Tables provided for H2 database engine under INFORMATION_SCHEMA schema

You can display all views by querying INFORMATION_SCHEMA.VIEWS system table

like image 27
Eralper Avatar answered Oct 25 '25 00:10

Eralper