1 echo "<<<<<<<<<<<<<<<<<<<<<<<< UPDATE t1 SET f2=NULL >>>>>>>>>>>>>>>>>>>>>>>>>";
2 echo create table t1
(f1 int not null
,f2 int
,f3 int
);
4 echo insert into t1 values
(1,2,3);
5 Statement Executed
: Rows Affected
= 1
6 echo insert into t1 values
(2,NULL
,4);
7 Statement Executed
: Rows Affected
= 1
8 echo insert into t1 values
(3,4,NULL
);
9 Statement Executed
: Rows Affected
= 1
10 echo insert into t1 values
(10,20,30);
11 Statement Executed
: Rows Affected
= 1
12 echo insert into t1 values
(11,NULL
,NULL
);
13 Statement Executed
: Rows Affected
= 1
15 echo select * from t1
;
16 ---------------------------------------------------------
18 ---------------------------------------------------------
25 echo update t1
set f2
=NULL
;
26 Statement Executed
: Rows Affected
= 5
28 echo select * from t1
;
29 ---------------------------------------------------------
31 ---------------------------------------------------------
40 echo "<<<<<<<<<<<<<<<<<<<<<<<< UPDATE t1 SET f1=NULL >>>>>>>>>>>>>>>>>>>>>>>>>";
41 echo create table t1
(f1 int not null
,f2 int
,f3 int
);
43 echo insert into t1 values
(1,2,3);
44 Statement Executed
: Rows Affected
= 1
45 echo insert into t1 values
(2,NULL
,4);
46 Statement Executed
: Rows Affected
= 1
47 echo insert into t1 values
(3,4,NULL
);
48 Statement Executed
: Rows Affected
= 1
49 echo insert into t1 values
(10,20,30);
50 Statement Executed
: Rows Affected
= 1
51 echo insert into t1 values
(11,NULL
,NULL
);
52 Statement Executed
: Rows Affected
= 1
54 echo select * from t1
;
55 ---------------------------------------------------------
57 ---------------------------------------------------------
64 echo update t1
set f1
=NULL
;
65 Statement prepare failed with error
-22
67 echo select * from t1
;
68 ---------------------------------------------------------
70 ---------------------------------------------------------
79 echo "<<<<<<<<<<<<<<<<<<<<<< UPDATE t1 SET f1=f1+f2+f3 >>>>>>>>>>>>>>>>>>>>>>>";
80 echo create table t1
(f1 int not null
,f2 int
,f3 int
);
82 echo insert into t1 values
(1,2,3);
83 Statement Executed
: Rows Affected
= 1
84 echo insert into t1 values
(2,NULL
,4);
85 Statement Executed
: Rows Affected
= 1
86 echo insert into t1 values
(3,4,NULL
);
87 Statement Executed
: Rows Affected
= 1
88 echo insert into t1 values
(10,20,30);
89 Statement Executed
: Rows Affected
= 1
90 echo insert into t1 values
(11,NULL
,NULL
);
91 Statement Executed
: Rows Affected
= 1
93 echo select * from t1
;
94 ---------------------------------------------------------
96 ---------------------------------------------------------
103 echo update t1
set f1
=f1
+f2
+f3
;
104 Statement execute failed with error
-22
106 echo select * from t1
;
107 ---------------------------------------------------------
109 ---------------------------------------------------------
118 echo "<<<<<<<<<<<<<<<<<< UPDATE t1 SET f2=0 WHERE f3>=1 >>>>>>>>>>>>>>>>>>>>>>";
119 echo create table t1
(f1 int not null
,f2 int
,f3 int
);
121 echo insert into t1 values
(1,2,3);
122 Statement Executed
: Rows Affected
= 1
123 echo insert into t1 values
(2,NULL
,4);
124 Statement Executed
: Rows Affected
= 1
125 echo insert into t1 values
(3,4,NULL
);
126 Statement Executed
: Rows Affected
= 1
127 echo insert into t1 values
(10,20,30);
128 Statement Executed
: Rows Affected
= 1
129 echo insert into t1 values
(11,NULL
,NULL
);
130 Statement Executed
: Rows Affected
= 1
132 echo select * from t1
;
133 ---------------------------------------------------------
135 ---------------------------------------------------------
142 echo UPDATE t1 SET f2
=0 where f3
>=1;
143 Statement Executed
: Rows Affected
= 3
145 echo select * from t1
;
146 ---------------------------------------------------------
148 ---------------------------------------------------------
157 echo "<<<<<<<<<<<<<<<<<<< DELETE FROM t1 WHERE f3>=4 >>>>>>>>>>>>>>>>>>>>>>>>>";
158 echo create table t1
(f1 int not null
,f2 int
,f3 int
);
160 echo insert into t1 values
(1,2,3);
161 Statement Executed
: Rows Affected
= 1
162 echo insert into t1 values
(2,NULL
,4);
163 Statement Executed
: Rows Affected
= 1
164 echo insert into t1 values
(3,4,NULL
);
165 Statement Executed
: Rows Affected
= 1
166 echo insert into t1 values
(10,20,30);
167 Statement Executed
: Rows Affected
= 1
168 echo insert into t1 values
(11,NULL
,NULL
);
169 Statement Executed
: Rows Affected
= 1
171 echo select * from t1
;
172 ---------------------------------------------------------
174 ---------------------------------------------------------
181 echo DELETE FROM t1 WHERE f3
>=4;
182 Statement Executed
: Rows Affected
= 2
184 echo select * from t1
;
185 ---------------------------------------------------------
187 ---------------------------------------------------------