apache_derby
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
apache_derby [2016/03/05 13:53] – skip | apache_derby [2020/12/27 20:35] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Apache Derby ====== | ||
+ | A tiny Java DB (2MB) deliered togehter with JDK. | ||
+ | == install == | ||
+ | set environment var DERBY_HOME | ||
+ | < | ||
+ | DERBY_HOME=d: | ||
+ | </ | ||
+ | |||
+ | and add DERBY_HOME\bin to Path environment variable | ||
+ | |||
+ | |||
+ | == start derby == | ||
+ | < | ||
+ | $DERBY_HOME/ | ||
+ | </ | ||
+ | |||
+ | == create Database == | ||
+ | Start queriing tool **ij** | ||
+ | < | ||
+ | ij | ||
+ | </ | ||
+ | |||
+ | Create DB by connecting to it with **create=true** | ||
+ | < | ||
+ | ij> connect ' | ||
+ | </ | ||
+ | |||
+ | Create **customer** Table | ||
+ | < | ||
+ | ij> create table customer (custId int primary key, firstname varchar(20), | ||
+ | </ | ||
+ | |||
+ | Print **customer** Table | ||
+ | < | ||
+ | ij> describe customer; | ||
+ | </ | ||
+ | |||
+ | Insert stuff into **customer** Table | ||
+ | < | ||
+ | ij> insert into customer values (1, ' | ||
+ | ij> insert into customer values (2, ' | ||
+ | ij> insert into customer values (3, ' | ||
+ | </ | ||
+ | |||
+ | Count stuff in **customer** Table | ||
+ | < | ||
+ | ij> select count(*) from customer; | ||
+ | </ |