adding test scripts
[csql.git] / test / tools / csql / exp.test049.ksh
blob5b8d623eb22af4a77c70bad1a5916798d357513a
1 echo create table t1 (f1 int, f2 int,f3 int);
2 Statement Executed
3 echo insert into t1 values(10,10,10);
4 Statement Executed: Rows Affected = 1
5 echo insert into t1 values(20,10,10);
6 Statement Executed: Rows Affected = 1
7 echo insert into t1 values(30,10,10);
8 Statement Executed: Rows Affected = 1
9 echo insert into t1 values(40,10,10);
10 Statement Executed: Rows Affected = 1
11 echo insert into t1 values(50,10,10);
12 Statement Executed: Rows Affected = 1
13 echo insert into t1 values(60,10,10);
14 Statement Executed: Rows Affected = 1
15 echo select * from t1;
16 ---------------------------------------------------------
17 t1.f1 t1.f2 t1.f3
18 ---------------------------------------------------------
19 10 10 10
20 20 10 10
21 30 10 10
22 40 10 10
23 50 10 10
24 60 10 10
26 echo update t1 set f1=f1+f2+f3+7,f2=f3+23+f1,f3=12;
27 Statement Executed: Rows Affected = 6
28 echo select * from t1;
29 ---------------------------------------------------------
30 t1.f1 t1.f2 t1.f3
31 ---------------------------------------------------------
32 37 43 12
33 47 53 12
34 57 63 12
35 67 73 12
36 77 83 12
37 87 93 12
39 echo update t1 set f1=f2/f3+7,f2=f3+23+f1,f3=f2 where f3=12;
40 Statement Executed: Rows Affected = 6
41 echo select * from t1;
42 ---------------------------------------------------------
43 t1.f1 t1.f2 t1.f3
44 ---------------------------------------------------------
45 10 72 43
46 11 82 53
47 12 92 63
48 13 102 73
49 13 112 83
50 14 122 93
52 echo create table t2 (f1 tinyint, f2 bigint,f3 int);
53 Statement Executed
54 echo insert into t2 values(60,1110,5110);
55 Statement Executed: Rows Affected = 1
56 echo insert into t2 values(70,1115,1510);
57 Statement Executed: Rows Affected = 1
58 echo insert into t2 values(80,1150,1150);
59 Statement Executed: Rows Affected = 1
60 echo insert into t2 values(90,1510,1115);
61 Statement Executed: Rows Affected = 1
62 echo insert into t2 values(50,5110,1110);
63 Statement Executed: Rows Affected = 1
64 echo select * from t2;
65 ---------------------------------------------------------
66 t2.f1 t2.f2 t2.f3
67 ---------------------------------------------------------
68 60 1110 5110
69 70 1115 1510
70 80 1150 1150
71 90 1510 1115
72 50 5110 1110
74 echo update t2 set f1=NULL,f2=f1+f2+f3+10 where f2>1122;
75 Statement Executed: Rows Affected = 3
76 echo select * from t2;
77 ---------------------------------------------------------
78 t2.f1 t2.f2 t2.f3
79 ---------------------------------------------------------
80 60 1110 5110
81 70 1115 1510
82 NULL 2390 1150
83 NULL 2725 1115
84 NULL 6280 1110
86 echo update t2 set f2=f2+123 ,f3=23+f2;
87 Statement Executed: Rows Affected = 5
88 echo select * from t2;
89 ---------------------------------------------------------
90 t2.f1 t2.f2 t2.f3
91 ---------------------------------------------------------
92 60 1233 1133
93 70 1238 1138
94 NULL 2513 2413
95 NULL 2848 2748
96 NULL 6403 6303
98 echo drop table t1;
99 Statement Executed
100 echo drop table t2;
101 Statement Executed