adding test scripts
[csql.git] / test / sql / DDL / exp.test003.ksh
blobab898692cc982fa4da4768c762ffcda16edaf436
1 echo create table t1(f1 int, f2 varchar(10), primary key(f1));
2 Statement Executed
3 echo create table t2(f1 int, f2 varchar(10), foreign key(f1) references t1(f1));
4 Statement Executed
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 ---------------------------------------------------------
13 t1.f1 t1.f2
14 ---------------------------------------------------------
15 1 CSQL1
16 2 CSQL2
18 echo select * from t2;
19 ---------------------------------------------------------
20 t2.f1 t2.f2
21 ---------------------------------------------------------
22 1 Nihar
23 2 Bijay
24 1 Kishor
25 2 Jitendra
27 echo truncate table t1;
28 Statement execute failed with error -36
29 echo select * from t1;
30 ---------------------------------------------------------
31 t1.f1 t1.f2
32 ---------------------------------------------------------
33 1 CSQL1
34 2 CSQL2
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 ---------------------------------------------------------
42 t1.f1 t1.f2
43 ---------------------------------------------------------
45 echo select * from t2;
46 ---------------------------------------------------------
47 t2.f1 t2.f2
48 ---------------------------------------------------------
50 Statement Executed
51 Statement Executed