1 echo create table t1(f1 int,f2 time);
2 create table t1(f1 int,f2 time);
3 echo insert into t1 values(1,'10:23:2');
4 insert into t1 values(1,'10:23:2');
5 echo insert into t1 values(2,'09:12:23');
6 insert into t1 values(2,'09:12:23');
7 echo insert into t1 values(3,'09:18:23');
8 insert into t1 values(3,'09:18:23');
9 echo insert into t1 values(4,'06:23:23');
10 insert into t1 values(4,'06:23:23');
11 echo insert into t1 values(5,now());
12 insert into t1 values(5,now());
13 echo insert into t1 values(6,'05:34:32');
14 insert into t1 values(6,'05:34:32');
15 echo insert into t1 values(7,now());
16 insert into t1 values(7,now());
17 echo select * from t1;
19 echo select * from t1 where f2<=now();
20 select * from t1 where f2<=now();
21 echo select * from t1 where f2>now();
22 select * from t1 where f2>now();
23 echo select * from t1;
25 echo update t1 set f2=now() where f1<=2;
26 update t1 set f2=now() where f1<=2;
27 echo select * from t1;
29 echo update t1 set f2=now(),f1=10 where f2='05:34:32';
30 update t1 set f2=now(),f1=10 where f2='05:34:32';
31 echo select * from t1;