How to see all tables in my h2 database at localhost:8082?

前端 未结 10 1056
误落风尘
误落风尘 2021-02-01 02:43

I use JDBC and created h2 database called usaDB from sql script. Then I filled all tables with jdbc.

The problem is that after I connect to usaDB at localhost:8082 I can

10条回答
  •  栀梦
    栀梦 (楼主)
    2021-02-01 03:24

    I had the same issue and the answer seems to be really stupid: when you type your database name you shouldn't add ".h2.db" suffix, for example, if you have db file "D:\somebase.h2.db" your connection string should be like "jdbc:h2:file:/D:/somebase". In other way jdbc creates new empty database file named "somebase.h2.db.h2.db" and you see what you see: only system tables.

提交回复
热议问题