Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I usually use SQLDeveloper to browse the database, but I couldn't make it work with HSQLDB and I don't know which tables are already created… I guess it's a vendor-specific question and not plain SQL, but the point is: how can I see the tables so I can drop/alter them?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
310 views
Welcome To Ask or Share your Answers For Others

1 Answer

The ANSI SQL92 standard for querying database metadata is contained within the INFORMATION_SCHEMA data structures.

I have no idea whether your database supports this or not, but try the following:

SELECT *
FROM   INFORMATION_SCHEMA.TABLES

On further research, it appears that HSQLDB does support INFORMATION_SCHEMA, but with slightly non-standard naming.

All of the tables have SYSTEM_* prepended to them, so the above example would read

SELECT *
FROM   INFORMATION_SCHEMA.SYSTEM_TABLES

I have no means of testing this, and the answer was found on sourceforge.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share

548k questions

547k answers

4 comments

86.3k users

...