ダウンロード・起動
- Download Latest Versionをクリックしてダウンロード
- 適当な場所に解凍
- コマンドプロンプトを開いて解凍したディレクトリに移動
- ↓を実行
java -classpath lib/hsqldb.jar org.hsqldb.server.Server --database.0
file:hsqldb/demodb --dbname.0 testdb
実行結果
[Server@4ee285c6]: Startup sequence initiated from main() method
[Server@4ee285c6]: Could not load properties from file
[Server@4ee285c6]: Using cli/default properties only
[Server@4ee285c6]: Initiating startup sequence...
[Server@4ee285c6]: Server socket opened successfully in 7 ms.
[Server@4ee285c6]: Database [index=0, id=0, db=file:testDB, alias=testdb] opened successfully in 405 ms.
[Server@4ee285c6]: Startup sequence completed in 441 ms.
[Server@4ee285c6]: 2023-06-25 09:59:28.321 HSQLDB server 2.7.2 is online on port 9001
[Server@4ee285c6]: To close normally, connect and execute SHUTDOWN SQL
[Server@4ee285c6]: From command line, use [Ctrl]+[C] to abort abruptly
マネージャーを開く
適当なテーブル作成
- 下記SQLを貼り付けてExecuteSQLを押す
CREATE TABLE tutorials_tbl (
id INT NOT NULL,
title VARCHAR(50) NOT NULL,
author VARCHAR(20) NOT NULL,
submission_date DATE,
PRIMARY KEY (id)
);