1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
|
select now(), subdate(now(), interval 1 second);
select now(), subdate(now(), interval 1 minute);
select now(), subdate(now(), interval 1 hour);
select now(), subdate(now(), interval 1 day);
select now(), subdate(now(), interval 1 month);
select now(), subdate(now(), interval 1 year);
select now(), subdate(now(), interval -5 second);
select now(), subdate(now(), interval -5 minute);
select now(), subdate(now(), interval -5 hour);
select now(), subdate(now(), interval -5 day);
select now(), subdate(now(), interval -5 month);
select now(), subdate(now(), interval -5 year);
select now(), subdate(now(), interval '20:90' SECOND_MICROSECOND);
select now(), subdate(now(), interval '15:20:90' MINUTE_MICROSECOND);
select now(), subdate(now(), interval '15:20' MINUTE_SECOND);
select now(), subdate(now(), interval '3:15:20:90' HOUR_MICROSECOND);
select now(), subdate(now(), interval '3:15:20' HOUR_SECOND);
select now(), subdate(now(), interval '3:15' HOUR_MINUTE);
select now(), subdate(now(), interval '2:3:15:20:90' DAY_MICROSECOND);
select now(), subdate(now(), interval '2:3:15:20' DAY_SECOND);
select now(), subdate(now(), interval '2:3:15' DAY_MINUTE);
select now(), subdate(now(), interval '2:3' DAY_HOUR);
select now(), subdate(now(), interval '3:4' YEAR_MONTH);
select now(), subdate(now(), 5);
select subdate(null, interval 5 year);
select subdate(now(), interval null year);
|