语法
参数说明
p:可选,指定的时间精度位数,支持的数据类型为 INT。最大支持返回微秒级时间(最多 6 位)。select current_timestamp(0) 等同于 select current_timestamp()。
返回值说明
- 如果不指定
p,则返回秒级精度的时间。 - 如果指定了
p,则返回指定精度的时间。
示例
示例一:返回当前时间。Text
获取当前时间,以 DATETIME 类型返回。
p:可选,指定的时间精度位数,支持的数据类型为 INT。最大支持返回微秒级时间(最多 6 位)。select current_timestamp(0) 等同于 select current_timestamp()。
p,则返回秒级精度的时间。p,则返回指定精度的时间。