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优化之like和=性能详析 2023-12-20
- 索引到底对查询速度有什么影响? 2024-02-14
- redis配置文件中slave-serve-stale-data的解释 2024-03-03
- Redis DEBUG OBJECT命令 2024-02-23
- MySQL之where使用详解 2023-08-06
- MongoDB中aggregate()方法实例详解 2023-07-16
- MariaDB的安装与配置教程 2023-07-24
- SQL SERVER中的流程控制语句 2024-01-19
- php数据库的增删改查 php与javascript之间的交互 2024-01-19
- SQL Server序列SEQUENCE用法介绍 2024-01-18