# insert[2]/btree(index)
Begin;
BeginTimeSpan;
Initialize;
EndTimeSpan;
# テスト用のDBを作る
InitializeSession "";
Command "create database TESTDB";
TerminateSession;

InitializeSession "TESTDB";
Command  "create table T1(C1 nvarchar(32), C2 nvarchar(2497))";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(32), C2 nvarchar(2497))";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" ["ほげ", textsjisfile "..\\..\\doc\\hello.txt"];
Command  "insert into T1 (C1, C2) values (?, ?)" ["ホゲ", textsjisfile "..\\..\\doc\\ricoh.txt"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" ["ぴよ", textsjisfile "..\\..\\doc\\ublab.txt", "ピヨ", textsjisfile "..\\..\\doc\\dictionary.txt"];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T2 where C1=? and C2=?" ["ぴよ", textsjisfile "..\\..\\doc\\ublab.txt"];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T1 where C1=? and C2=?" ["ほげ", textsjisfile "..\\..\\doc\\hello.txt"];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(2497), C2 nvarchar(2497))";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(2497), C2 nvarchar(2497))";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\sasameyuki.txt"];
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\speak.txt"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [textsjisfile "..\\..\\doc\\ublab.txt", textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt", textsjisfile "..\\..\\doc\\dictionary.txt", textsjisfile "..\\..\\doc\\dictionary.txt"];
# 他のtableからinsert...select
Command  "insert into T1 select (C1, C2) from T2 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\ublab.txt", textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt"];
# 自分自身にinsert...select
Command  "insert into T1 select (C1, C2) from T1 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\sasameyuki.txt"];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(2497), C2 int)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(2497), C2 int)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\sasameyuki.txt", 777];
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\speak.txt", 555];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt", 333, textsjisfile "..\\..\\doc\\dictionary.txt", 99999999];
# 他のtableからinsert...select
Command  "insert into T1 select C1, C2 from T2 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt", 333];
# 自分自身にinsert...select
Command  "insert into T1 select C1, C2 from T1 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\sasameyuki.txt", 777];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 int, C2 float)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 int, C2 float)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [777, 3.141592];
Command  "insert into T1 (C1, C2) values (?, ?)" [555, 2.718281];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [333, 1.414213, 99999999, -0.789878];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T2 where C1=? and C2=?" [333, 1.414213];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T1 where C1=? and C2=?" [777, 3.141592];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 float, C2 datetime)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 float, C2 datetime)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [3.141592, time "2001-07-07 12:34:56.789"];
Command  "insert into T1 (C1, C2) values (?, ?)" [2.718281, time "2001-09-09 00:00:00.000"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [1.414213, time "2002-10-11 17:34:51.000", -0.789878, time "1999-07-21 13:20:00.600"];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T2 where C1=? and C2=?" [1.414213, time "2002-10-11 17:34:51.000"];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T1 where C1=? and C2=?" [3.141592, time "2001-07-07 12:34:56.789"];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 datetime)";
Command  "create index I1 on T1(C1)";
Command  "create table T2(C1 datetime)";
Command  "create index I2 on T2(C1)";
Command  "select C1 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1) values (?)" [time "2001-07-07 12:34:56.789"];
Command  "insert into T1 (C1) values (?)" [time "2001-09-09 00:00:00.000"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1) values (?), (?)" [time "2002-10-11 17:34:51.000", time "1999-07-21 13:20:00.600"];
# 他のtableからinsert...select
Command  "insert into T1 select (C1) from T2 where C1=?" [time "2002-10-11 17:34:51.000"];
# 自分自身にinsert...select
Command  "insert into T1 select (C1) from T1 where C1=?" [time "2001-07-07 12:34:56.789"];
Command  "select C1 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(32))";
Command  "create index I1 on T1(C1)";
Command  "create table T2(C1 nvarchar(32))";
Command  "create index I2 on T2(C1)";
Command  "select C1 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1) values (?)" ["ほげ"];
Command  "insert into T1 (C1) values (?)" ["ホゲ"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1) values (?), (?)" ["ぴよ", "ピヨ"];
# 他のtableからinsert...select
Command  "insert into T1 select C1 from T2 where C1=?" ["ぴよ"];
# 自分自身にinsert...select
Command  "insert into T1 select C1 from T1 where C1=?" ["ほげ"];
Command  "select C1 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(32), C2 nvarchar(2497))";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(32), C2 nvarchar(2497))";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
Command  "insert into T1 (C1, C2) values (?, ?)" ["ホゲ", textsjisfile "..\\..\\doc\\ricoh.txt"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [null, null, "ピヨ", textsjisfile "..\\..\\doc\\dictionary.txt"];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T2 where C1 is null and C2 is null" [];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T1 where C1 is null and C2 is null" [];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(2497), C2 nvarchar(2497))";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(2497), C2 nvarchar(2497))";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\ricoh.txt", textsjisfile "..\\..\\doc\\speak.txt"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [null, null, textsjisfile "..\\..\\doc\\dictionary.txt", textsjisfile "..\\..\\doc\\dictionary.txt"];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T2 where C1 is null and C2 is null" [];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T1 where C1 is null and C2 is null" [];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(2497), C2 int)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(2497), C2 int)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\speak.txt", 555];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [null, null, textsjisfile "..\\..\\doc\\dictionary.txt", 99999999];
# 他のtableからinsert...select
Command  "insert into T1 select (C1, C2) from T2 where C1 is null and C2 is null" [];
# 自分自身にinsert...select
Command  "insert into T1 select (C1, C2) from T1 where C1 is null and C2 is null" [];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 int, C2 float)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 int, C2 float)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
Command  "insert into T1 (C1, C2) values (?, ?)" [555, 2.718281];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [null, null, 99999999, -0.789878];
# 他のtableからinsert...select
Command  "insert into T1 select C1, C2 from T2 where C1 is null and C2 is null" [];
# 自分自身にinsert...select
Command  "insert into T1 select C1, C2 from T1 where C1 is null and C2 is null" [];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 float, C2 datetime)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 float, C2 datetime)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
Command  "insert into T1 (C1, C2) values (?, ?)" [2.718281, time "2001-09-09 00:00:00.000"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [null, null, -0.789878, time "1999-07-21 13:20:00.600"];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T2 where C1 is null and C2 is null" [];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T1 where C1 is null and C2 is null" [];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 datetime)";
Command  "create index I1 on T1(C1)";
Command  "create table T2(C1 datetime)";
Command  "create index I2 on T2(C1)";
Command  "select C1 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1) values (?)" [null];
Command  "insert into T1 (C1) values (?)" [time "2001-09-09 00:00:00.000"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1) values (?), (?)" [null, time "1999-07-21 13:20:00.600"];
# 他のtableからinsert...select
Command  "insert into T1 (C1) select C1 from T2 where C1 is null" [];
# 自分自身にinsert...select
Command  "insert into T1 (C1) select C1 from T1 where C1 is null" [];
Command  "select C1 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(32))";
Command  "create index I1 on T1(C1)";
Command  "create table T2(C1 nvarchar(32))";
Command  "create index I2 on T2(C1)";
Command  "select C1 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1) values (?)" [null];
Command  "insert into T1 (C1) values (?)" ["ホゲ"];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1) values (?), (?)" [null, "ピヨ"];
# 他のtableからinsert...select
Command  "insert into T1 select (C1) from T2 where C1 is null" [];
# 自分自身にinsert...select
Command  "insert into T1 select (C1) from T1 where C1 is null" [];
Command  "select C1 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(32), C2 nvarchar(2497))";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(32), C2 nvarchar(2497))";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" ["ほげ", textsjisfile "..\\..\\doc\\hello.txt"];
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" ["ぴよ", textsjisfile "..\\..\\doc\\ublab.txt", null, null];
# 他のtableからinsert...select
Command  "insert into T1 select C1, C2 from T2 where C1=? and C2=?" ["ぴよ", textsjisfile "..\\..\\doc\\ublab.txt"];
# 自分自身にinsert...select
Command  "insert into T1 select C1, C2 from T1 where C1=? and C2=?" ["ほげ", textsjisfile "..\\..\\doc\\hello.txt"];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(2497), C2 nvarchar(2497))";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(2497), C2 nvarchar(2497))";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\sasameyuki.txt"];
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [textsjisfile "..\\..\\doc\\ublab.txt", textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt", null, null];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T2 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\ublab.txt", textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt"];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select (C1, C2) from T1 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\hello.txt", textsjisfile "..\\..\\doc\\sasameyuki.txt"];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(2497), C2 int)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 nvarchar(2497), C2 int)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [textsjisfile "..\\..\\doc\\sasameyuki.txt", 777];
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt", 333, null, null];
# 他のtableからinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T2 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\Alangri-Gloriban.txt", 333];
# 自分自身にinsert...select
Command  "insert into T1 (C1, C2) select C1, C2 from T1 where C1=? and C2=?" [textsjisfile "..\\..\\doc\\sasameyuki.txt", 777];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 int, C2 float)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 int, C2 float)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [777, 3.141592];
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [333, 1.414213, null, null];
# 他のtableからinsert...select
Command  "insert into T1 select (C1, C2) from T2 where C1=? and C2=?" [333, 1.414213];
# 自分自身にinsert...select
Command  "insert into T1 select (C1, C2) from T1 where C1=? and C2=?" [777, 3.141592];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 float, C2 datetime)";
Command  "create index I1 on T1(C1, C2)";
Command  "create index I1_1 on T1(C1)";
Command  "create index I1_2 on T1(C2)";
Command  "create table T2(C1 float, C2 datetime)";
Command  "create index I2 on T2(C1, C2)";
Command  "create index I2_1 on T2(C1)";
Command  "create index I2_2 on T2(C2)";
Command  "select C1, C2 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1, C2) values (?, ?)" [3.141592, time "2001-07-07 12:34:56.789"];
Command  "insert into T1 (C1, C2) values (?, ?)" [null, null];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1, C2) values (?, ?), (?, ?)" [1.414213, time "2002-10-11 17:34:51.000", null, null];
# 他のtableからinsert...select
Command  "insert into T1 select C1, C2 from T2 where C1=? and C2=?" [1.414213, time "2002-10-11 17:34:51.000"];
# 自分自身にinsert...select
Command  "insert into T1 select C1, C2 from T1 where C1=? and C2=?" [3.141592, time "2001-07-07 12:34:56.789"];
Command  "select C1, C2 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 datetime)";
Command  "create index I1 on T1(C1)";
Command  "create table T2(C1 datetime)";
Command  "create index I2 on T2(C1)";
Command  "select C1 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1) values (?)" [time "2001-07-07 12:34:56.789"];
Command  "insert into T1 (C1) values (?)" [null];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1) values (?), (?)" [time "2002-10-11 17:34:51.000", null];
# 他のtableからinsert...select
Command  "insert into T1 (C1) select (C1) from T2 where C1=?" [time "2002-10-11 17:34:51.000"];
# 自分自身にinsert...select
Command  "insert into T1 (C1) select (C1) from T1 where C1=?" [time "2001-07-07 12:34:56.789"];
Command  "select C1 from T1";
Command  "drop table T1";
Command  "drop table T2";

Command  "create table T1(C1 nvarchar(32))";
Command  "create index I1 on T1(C1)";
Command  "create table T2(C1 nvarchar(32))";
Command  "create index I2 on T2(C1)";
Command  "select C1 from T1";
# SQLコマンドinsertをテストする
Command  "insert into T1 (C1) values (?)" ["ほげ"];
Command  "insert into T1 (C1) values (?)" [null];
# 複数タプルをまとめてinsert
Command  "insert into T2 (C1) values (?), (?)" ["ぴよ", null];
# 他のtableからinsert...select
Command  "insert into T1 (C1) select C1 from T2 where C1=?" ["ぴよ"];
# 自分自身にinsert...select
Command  "insert into T1 (C1) select C1 from T1 where C1=?" ["ほげ"];
Command  "select C1 from T1";
#Command  "drop table T1";
#Command  "drop table T2";

Command  "select * from T1";
Command  "select * from T2";

TerminateSession;
# DBの後始末
#InitializeSession "";
#Command "drop database TESTDB";
#TerminateSession;
# (障害回復を試すためTerminateしない)
End;
