mysql哪些函数可以获取各种时间类型,下面编程教程网小编给大家介绍一下各种mysql函数!
获取当地具体日期和时间(年月日时分秒)
//方法一
select now() as time
//方法二
select LOCALTIME() as time
//方法三
select current_timestamp() as time
//方法四
select LOCALTIMESTAMP() as time
//方法五
select sysdate() as time
获取当地具体日期和时间(年月日)
//方法一
select curdate() as time
//方法二
select current_date() as time
获取具体的时间(时分秒)
//方法一
select curtime() as time
//方法二
select current_time() as
//方法三
select utc_time() as time
以上是编程学习网小编为您介绍的“mysql哪些函数可以获取各种时间类型”的全面内容,想了解更多关于 mysql 内容,请继续关注编程基础学习网。
织梦狗教程
本文标题为:mysql哪些函数可以获取各种时间类型


基础教程推荐
猜你喜欢
- mysql主从同步原理及应用场景示例详解 2022-09-12
- Django QuerySet查询集原理及代码实例 2023-12-15
- Redis GET命令 2024-01-31
- MySQL的逻辑架构及工作全流程 2023-12-16
- Redis内存设置 2023-09-13
- mysql数据库查询优化 mysql效率第3/3页 2023-12-18
- Oracle listagg去重distinct的三种方式总结 2023-07-23
- Redis SPOP命令 2024-01-30
- MongoDB对Document(文档)的插入、删除及更新 2023-07-16
- CodeIgniter针对数据库的连接、配置及使用方法 2023-12-15