重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛
标题:
postgres查询当前时间的方法
[打印本页]
作者:
jiawang
时间:
2025-9-14 19:29
标题:
postgres查询当前时间的方法
本帖最后由 jiawang 于 2025-9-14 19:29 编辑
1、使用now()
postgres=# select now();
now
-------------------------------
2025-09-14 19:27:54.940888+08
(1 row)
postgres=#
2、current_timestamp
postgres=# select current_timestamp;
current_timestamp
-------------------------------
2025-09-14 19:28:05.948023+08
(1 row)
欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/)
Powered by Discuz! X3.2