1 echo create table t1
(f1 int
, f2 varchar
(10), primary key
(f1
));
3 echo create table t2
(f1 int
, f2 varchar
(10), foreign key
(f1
) references t1
(f1
));
5 Statement Executed
: Rows Affected
= 1
6 Statement Executed
: Rows Affected
= 1
7 Statement Executed
: Rows Affected
= 1
8 Statement Executed
: Rows Affected
= 1
9 Statement Executed
: Rows Affected
= 1
10 Statement Executed
: Rows Affected
= 1
11 echo select * from t1
;
12 ---------------------------------------------------------
14 ---------------------------------------------------------
18 echo select * from t2
;
19 ---------------------------------------------------------
21 ---------------------------------------------------------
27 echo truncate table t1
;
28 Statement execute failed with error
-36
29 echo select * from t1
;
30 ---------------------------------------------------------
32 ---------------------------------------------------------
36 echo truncate table t2
;
37 Statement Executed
: Rows Affected
= 4
38 echo truncate table t1
;
39 Statement Executed
: Rows Affected
= 2
40 echo select * from t1
;
41 ---------------------------------------------------------
43 ---------------------------------------------------------
45 echo select * from t2
;
46 ---------------------------------------------------------
48 ---------------------------------------------------------