Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see all the tables in an HSQLDB database?

Tags:

sql

hsqldb

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?

like image 520
nobody Avatar asked Feb 26 '09 17:02

nobody


People also ask

How do I see the tables in a schema?

To show the schema, we can use the DESC command. This gives the description about the table structure. The following is the syntax. DESCRIBE yourDatabasename.


1 Answers

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.

like image 89
Steve Weet Avatar answered Oct 18 '22 15:10

Steve Weet