-
Download from https://db.apache.org/derby/releases/release-10_16_1_1.cgi
-
Set DERBY_HOME
DERBY_HOME=~/Downloads/db-derby-10.16.1.1-bin
-
Copy sql
cp ~/Downloads/db-derby-10.16.1.1-bin/demo/programs/toursdb/*.sql .
-
Run
ij
.java -jar $DERBY_HOME/lib/derbyrun.jar ij
-
Connect to the database (embeded)
ij> CONNECT 'jdbc:derby:firstdb;create=true';
Check
derby.log
andfirstdb
dir:firstdb ├── README_DO_NOT_TOUCH_FILES.txt ├── log ├── seg0 └── service.properties
-
Run SQL
CREATE TABLE FIRSTTABLE (ID INT PRIMARY KEY, NAME VARCHAR(12)); INSERT INTO FIRSTTABLE VALUES (10,'TEN'),(20,'TWENTY'),(30,'THIRTY'); SELECT * FROM FIRSTTABLE; SELECT * FROM FIRSTTABLE WHERE ID=20;
-
Disconnect
disconnect; exit;
02-derbydatabase-system
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||