File Removed
[csql.git] / test / tools / csql / exp.test004.ksh
blobd3bbafa58b2bb6c8cb082c1db4b60f01b6295695
1 echo Same as csql2 but with primary key;
2 Statement Executed
3 Statement Executed: Rows Affected = 1
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 echo select * from t1;
10 ---------------------------------------------------------
11 t1.f1 t1.f2
12 ---------------------------------------------------------
13 10 20
14 11 21
15 12 22
16 13 23
17 14 24
18 50 50
20 echo select * from t1 where f1 = 100;
21 ---------------------------------------------------------
22 t1.f1 t1.f2
23 ---------------------------------------------------------
25 echo select * from t1 where f1 = 10;
26 ---------------------------------------------------------
27 t1.f1 t1.f2
28 ---------------------------------------------------------
29 10 20
31 echo select f1 from t1 where f1 = 11;
32 ---------------------------------------------------------
33 f1
34 ---------------------------------------------------------
35 11
37 echo select f2 from t1 where f1 = 11;
38 ---------------------------------------------------------
39 f2
40 ---------------------------------------------------------
41 21
43 echo select f1, f2 from t1 where f1 = 12;
44 ---------------------------------------------------------
45 f1 f2
46 ---------------------------------------------------------
47 12 22
49 echo select * from t1 where f1 != 12 AND f2 <= 13;
50 ---------------------------------------------------------
51 t1.f1 t1.f2
52 ---------------------------------------------------------
54 echo select * from t1 where f1 = 12 AND f2 >= 22;
55 ---------------------------------------------------------
56 t1.f1 t1.f2
57 ---------------------------------------------------------
58 12 22
60 echo select * from t1 where f1 = 12 OR f1 > 13;
61 ---------------------------------------------------------
62 t1.f1 t1.f2
63 ---------------------------------------------------------
64 12 22
65 14 24
66 50 50
68 echo select * from t1 where f1 = 12 OR f2 < 13;
69 ---------------------------------------------------------
70 t1.f1 t1.f2
71 ---------------------------------------------------------
72 12 22
74 echo select * from t1 where f1 = 12 OR f2 <> 22;
75 ---------------------------------------------------------
76 t1.f1 t1.f2
77 ---------------------------------------------------------
78 10 20
79 11 21
80 12 22
81 13 23
82 14 24
83 50 50
85 echo select * from t1 where NOT f1 = 12;
86 ---------------------------------------------------------
87 t1.f1 t1.f2
88 ---------------------------------------------------------
89 10 20
90 11 21
91 13 23
92 14 24
93 50 50
95 echo select * from t1 where f1 != 12;
96 ---------------------------------------------------------
97 t1.f1 t1.f2
98 ---------------------------------------------------------
99 10 20
100 11 21
101 13 23
102 14 24
103 50 50
105 echo select * from t1 where NOT f1 != 12;
106 ---------------------------------------------------------
107 t1.f1 t1.f2
108 ---------------------------------------------------------
109 12 22
111 echo select * from t1 where NOT (f1 = 12 AND f2 =22);
112 ---------------------------------------------------------
113 t1.f1 t1.f2
114 ---------------------------------------------------------
115 10 20
116 11 21
117 13 23
118 14 24
119 50 50
121 echo select * from t1 where NOT (f1 = 12 OR f2 = 23);
122 ---------------------------------------------------------
123 t1.f1 t1.f2
124 ---------------------------------------------------------
125 10 20
126 11 21
127 14 24
128 50 50
130 echo select * from t1 where f1 = 12 OR f2 = 23 OR f2 = 22;
131 ---------------------------------------------------------
132 t1.f1 t1.f2
133 ---------------------------------------------------------
134 12 22
135 13 23
137 echo select * from t1 where f1+12 = 20;
138 Statement prepare failed with error -19
139 echo select * from t1 where f1 = 12 + f2;
140 Statement prepare failed with error -19
141 echo select * from t1 where f1 = f2;
142 ---------------------------------------------------------
143 t1.f1 t1.f2
144 ---------------------------------------------------------
145 50 50
147 echo select * from t1 where f1=12 and f1<=13 or f1>=11;
148 ---------------------------------------------------------
149 t1.f1 t1.f2
150 ---------------------------------------------------------
151 11 21
152 12 22
153 13 23
154 14 24
155 50 50
157 Statement Executed