117 lines
1.5 KiB
Plaintext
117 lines
1.5 KiB
Plaintext
#Javagui
|
|
|
|
restore database opt2 from '../bin/opt'
|
|
|
|
|
|
# delete
|
|
|
|
delete from plz where plz = 58084
|
|
|
|
delete from plz where ort = "Dortmund"
|
|
|
|
delete from ten
|
|
|
|
|
|
|
|
# insert
|
|
|
|
insert into plz values [44135, "Dortmund"]
|
|
|
|
insert into ten select * from thousand
|
|
|
|
|
|
|
|
# update
|
|
|
|
update ten set [no = no * 5]
|
|
|
|
update plz set [ort = "Stadt Hagen"] where ort = "Hagen"
|
|
|
|
|
|
|
|
# create
|
|
|
|
|
|
create table mitarbeiter columns [nachname: string, vorname: string, telefon: int]
|
|
|
|
insert into mitarbeiter values ["Behr", "Thomas", 4284]
|
|
|
|
insert into mitarbeiter values ["Düntgen", "Christian", 4282]
|
|
|
|
|
|
create table plzneu columns [plza: int, ort: string]
|
|
|
|
insert into plzneu select [plz as plza, ort] from plz
|
|
|
|
**** fails
|
|
|
|
insert into plzneu select * from plz where ort > "M"
|
|
|
|
select count(*) from plzneu
|
|
|
|
|
|
create index on plzneu columns ort
|
|
|
|
create index on plzneu columns plza indextype btree
|
|
|
|
select * from plzneu where plza = 44135
|
|
|
|
delete from plzneu where ort = "Bochum"
|
|
|
|
|
|
create table plzneu3 columns [plz: int, ort: string]
|
|
|
|
insert into plzneu3 select [plz as plz, ort] from plz where plz > 50000
|
|
|
|
********** fails
|
|
|
|
insert into plzneu3 select * from plz where plz > 50000
|
|
|
|
********* fails
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# drop
|
|
|
|
drop table mitarbeiter
|
|
|
|
|
|
drop index on plzneu columns ort
|
|
|
|
drop index plzneu_plza_btree
|
|
|
|
create index on plzneu columns ort
|
|
|
|
drop table plzneu
|
|
|
|
|
|
|
|
drop index plz_ort
|
|
|
|
drop index on plz columns ort
|
|
|
|
drop index on plz columns plz
|
|
|
|
create index on plz columns plz
|
|
|
|
create index on plz columns ort
|
|
|
|
drop table plz
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|