How to see all the tables in an HSQLDB database?

前端 未结 6 1365
自闭症患者
自闭症患者 2020-11-30 04:44

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-specif

6条回答
  •  感动是毒
    2020-11-30 05:25

    If you're on the command line, you may want to try the Hsqldb SqlTool, documented in the SqlTool Manual (hsqldb.org).

    • Put your database connection information in "~/sqltool.rc" and choose any DBNAME you want, substitute correct username and password, if known.
      • urlid DBNAME
      • url jdbc:hsqldb:/path/to/hsql/database
      • username SA
      • password
    • Install tool with: apt-get install hsqldb-utils (on Ubuntu)
    • Connect with hsqldb-sqltool DBNAME # on Ubuntu
    • Hint for other systems: java -jar YourHsqlJar.jar DBNAME
    • Show tables with: \dt
    • Show columns with: \d TABLENAME
    • Standard queries like: SELECT * FROM …;
    • Edit (append) last command with: :a
    • Quit with: \q
    • View special commands with: \? OR :?

    Good luck!

提交回复
热议问题