1.获取当前完整时间
下面的查询都省略了from dual关键字,可根据需要添加。

1.1 now()函数

select now();
查询结果:

1 2022-08-10 11:09:28 

1.2 sysdate()函数

select sysdate();
查询结果:

1 2022-08-10 11:19:28 

1.3 current_timestamp或current_timestamp()
current_timestamp和current_timestamp()函数的效果是一样的,只不过一个是关键字,一个是函数。它们的效果和now()函数也是一样的!

select current_timestamp;
select current_timestamp();
查询结果:

1 2022-08-10 

版权声明:本文为weixin_52805903原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_52805903/article/details/126279218