三个字:强、大、全,强力推荐之 SQL语句 查询结果 select (timestamp 2005-01-17 10:00 - timestamp 2005-01-01); 16 10:10 select (timestamp 2005-01-17 10:00 - timestamp 2005-01-01) / 7; 2 08:17:08.571429 select (timestamp 2005-01-17 10:00 - tim
三个字:强、大、全,强力推荐之
SQL语句 | 查询结果 |
---|---|
select (timestamp '2005-01-17 10:00' - timestamp '2005-01-01'); 登入後複製 |
16 10:10 登入後複製 |
select (timestamp '2005-01-17 10:00' - timestamp '2005-01-01') / 7; 登入後複製 |
2 08:17:08.571429 登入後複製 |
select (timestamp '2005-01-17 10:00' - timestamp '2005-01-01') day; 登入後複製 |
16 登入後複製 |
select cast((timestamp '2005-01-17 10:00' - timestamp '2005-01-01') day as integer) / 7; 登入後複製 |
2 登入後複製 登入後複製 登入後複製 |
select floor((timestamp '2005-01-17 10:00' - timestamp '2005-01-01') / interval '7'); 登入後複製 |
2 登入後複製 登入後複製 登入後複製 |
select timestamptz '2009-05-29 15:21:00.456789'; 登入後複製 |
2009-05-2915:21:00.456789-04 登入後複製 |
select timestamptz '2009-05-28'; 登入後複製 |
2009-05-2800:00:00-04 登入後複製 |
select timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28'; 登入後複製 |
1 15:21:00.456789 登入後複製 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28'); 登入後複製 |
1 15:21:00.456789 登入後複製 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28')(3); 登入後複製 |
1 15:21:00.457 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28')second; 登入後複製 |
141660.456789 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28') year; 登入後複製 |
0 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2007-01-01') month; 登入後複製 |
28 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2007-01-01') year; 登入後複製 |
2 登入後複製 登入後複製 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2007-01-01') year to month; 登入後複製 |
2-4 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28') second(3); 登入後複製 |
141660.457 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28') minute(3); 登入後複製 |
2361 登入後複製 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28') minute; 登入後複製 |
2361 登入後複製 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28') minute to second(3); 登入後複製 |
2361:00.457 登入後複製 |
select (timestamptz '2009-05-29 15:21:00.456789'-timestamptz '2009-05-28') minute to second; 登入後複製 |
2361:00.456789 登入後複製 |