如何查看HSQLDB数据库中的所有表? [英] How to see all the tables in an HSQLDB database?

查看:552
本文介绍了如何查看HSQLDB数据库中的所有表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通常使用SQLDeveloper来浏览数据库,但是我无法使其与HSQLDB一起使用,并且我不知道已经创建了哪些表… 我想这是一个特定于供应商的问题,而不是普通的SQL,但重点是:如何查看表,以便可以删除/更改它们?

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?

推荐答案

用于查询数据库元数据的ANSI SQL92标准包含在INFORMATION_SCHEMA数据结构中.

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

在进一步的研究中,似乎HSQLDB确实支持INFORMATION_SCHEMA,但是命名有点不规范.

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

所有表都以SYSTEM_*开头,因此上面的示例将显示为

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

SELECT *
FROM   INFORMATION_SCHEMA.SYSTEM_TABLES

我无法对此进行测试,并且答案在 sourceforge .

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

这篇关于如何查看HSQLDB数据库中的所有表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆