adding test scripts
[csql.git] / test / tools / csql / exp.testnw004.ksh
blob70fa6d2dd113e240a009360ca8f42f35bf4b3d21
1 Network CSql
2 echo Same as csql2 but with primary key;
3 Statement Executed
4 Statement Executed: Rows Affected = 1
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 echo select * from t1;
11 ---------------------------------------------------------
12 t1.f1 t1.f2
13 ---------------------------------------------------------
14 10 20
15 11 21
16 12 22
17 13 23
18 14 24
19 50 50
21 echo select * from t1 where f1 = 100;
22 ---------------------------------------------------------
23 t1.f1 t1.f2
24 ---------------------------------------------------------
26 echo select * from t1 where f1 = 10;
27 ---------------------------------------------------------
28 t1.f1 t1.f2
29 ---------------------------------------------------------
30 10 20
32 echo select f1 from t1 where f1 = 11;
33 ---------------------------------------------------------
34 f1
35 ---------------------------------------------------------
36 11
38 echo select f2 from t1 where f1 = 11;
39 ---------------------------------------------------------
40 f2
41 ---------------------------------------------------------
42 21
44 echo select f1, f2 from t1 where f1 = 12;
45 ---------------------------------------------------------
46 f1 f2
47 ---------------------------------------------------------
48 12 22
50 echo select * from t1 where f1 != 12 AND f2 <= 13;
51 ---------------------------------------------------------
52 t1.f1 t1.f2
53 ---------------------------------------------------------
55 echo select * from t1 where f1 = 12 AND f2 >= 22;
56 ---------------------------------------------------------
57 t1.f1 t1.f2
58 ---------------------------------------------------------
59 12 22
61 echo select * from t1 where f1 = 12 OR f1 > 13;
62 ---------------------------------------------------------
63 t1.f1 t1.f2
64 ---------------------------------------------------------
65 12 22
66 14 24
67 50 50
69 echo select * from t1 where f1 = 12 OR f2 < 13;
70 ---------------------------------------------------------
71 t1.f1 t1.f2
72 ---------------------------------------------------------
73 12 22
75 echo select * from t1 where f1 = 12 OR f2 <> 22;
76 ---------------------------------------------------------
77 t1.f1 t1.f2
78 ---------------------------------------------------------
79 10 20
80 11 21
81 12 22
82 13 23
83 14 24
84 50 50
86 echo select * from t1 where NOT f1 = 12;
87 ---------------------------------------------------------
88 t1.f1 t1.f2
89 ---------------------------------------------------------
90 10 20
91 11 21
92 13 23
93 14 24
94 50 50
96 echo select * from t1 where f1 != 12;
97 ---------------------------------------------------------
98 t1.f1 t1.f2
99 ---------------------------------------------------------
100 10 20
101 11 21
102 13 23
103 14 24
104 50 50
106 echo select * from t1 where NOT f1 != 12;
107 ---------------------------------------------------------
108 t1.f1 t1.f2
109 ---------------------------------------------------------
110 12 22
112 echo select * from t1 where NOT (f1 = 12 AND f2 =22);
113 ---------------------------------------------------------
114 t1.f1 t1.f2
115 ---------------------------------------------------------
116 10 20
117 11 21
118 13 23
119 14 24
120 50 50
122 echo select * from t1 where NOT (f1 = 12 OR f2 = 23);
123 ---------------------------------------------------------
124 t1.f1 t1.f2
125 ---------------------------------------------------------
126 10 20
127 11 21
128 14 24
129 50 50
131 echo select * from t1 where f1 = 12 OR f2 = 23 OR f2 = 22;
132 ---------------------------------------------------------
133 t1.f1 t1.f2
134 ---------------------------------------------------------
135 12 22
136 13 23
138 echo select * from t1 where f1+12 = 20;
139 Statement prepare failed with error -19
140 echo select * from t1 where f1 = 12 + f2;
141 Statement prepare failed with error -19
142 echo select * from t1 where f1 = f2;
143 ---------------------------------------------------------
144 t1.f1 t1.f2
145 ---------------------------------------------------------
146 50 50
148 echo select * from t1 where f1=12 and f1<=13 or f1>=11;
149 ---------------------------------------------------------
150 t1.f1 t1.f2
151 ---------------------------------------------------------
152 11 21
153 12 22
154 13 23
155 14 24
156 50 50
158 Statement Executed