1 echo create table t1
(f1 int not null
,f2 int
,f3 int
);
3 echo create index idx1 on t1
(f1
,f2
) hash unique
;
5 echo insert into t1 values
(1,2,3);
6 Statement Executed
: Rows Affected
= 1
7 echo insert into t1 values
(1,2,4);
8 Statement execute failed with error
-21
10 ---------------------------------------------------------
12 ---------------------------------------------------------
17 echo create table t1
(f1 int not null
,f2 int not null
,f3 int
);
19 echo create index idx2 on t1
(f1
,f2
) hash primary
;
21 echo insert into t1 values
(1,2,3);
22 Statement Executed
: Rows Affected
= 1
23 echo insert into t1 values
(1,2,4);
24 Statement execute failed with error
-21
25 echo select * from t1
;
26 ---------------------------------------------------------
28 ---------------------------------------------------------
33 echo create table t1
(f1 int not null
,f2 int
,f3 int
,primary key
(f1
,f2
));
35 echo insert into t1 values
(1,2,3);
36 Statement Executed
: Rows Affected
= 1
37 echo insert into t1 values
(1,2,4);
38 Statement execute failed with error
-21
39 echo select * from t1
;
40 ---------------------------------------------------------
42 ---------------------------------------------------------
47 echo create table t1
(f1 int not null
,f2 int
,f3 int
);
49 echo create index idx1 on t1
(f1
,f3
) hash unique
;
51 echo insert into t1 values
(1,2,3);
52 Statement Executed
: Rows Affected
= 1
53 echo insert into t1 values
(1,4,3);
54 Statement execute failed with error
-21
55 echo select * from t1
;
56 ---------------------------------------------------------
58 ---------------------------------------------------------
63 echo create table t1
(f1 int not null
,f2 int
,f3 int not null
);
65 echo create index idx2 on t1
(f1
,f3
) hash primary
;
67 echo insert into t1 values
(1,2,3);
68 Statement Executed
: Rows Affected
= 1
69 echo insert into t1 values
(1,4,3);
70 Statement execute failed with error
-21
71 echo select * from t1
;
72 ---------------------------------------------------------
74 ---------------------------------------------------------
79 echo create table t1
(f1 int not null
,f2 int
,f3 int
,primary key
(f1
,f3
));
81 echo insert into t1 values
(1,2,3);
82 Statement Executed
: Rows Affected
= 1
83 echo insert into t1 values
(1,4,3);
84 Statement execute failed with error
-21
85 echo select * from t1
;
86 ---------------------------------------------------------
88 ---------------------------------------------------------
93 echo create table t1
(f1 int
,f2 int
,f3 int
,f4 int
,primary key
(f2
,f4
));
95 echo insert into t1 values
(1,2,3,4);
96 Statement Executed
: Rows Affected
= 1
97 echo insert into t1 values
(1,2,5,4);
98 Statement execute failed with error
-21
99 echo select * from t1
;
100 ---------------------------------------------------------
101 t1.f1 t1.f2 t1.f3 t1.f4
102 ---------------------------------------------------------