三个字:强、大、全,强力推荐之 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 登录后复制 |