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哪些函数可以获取各种时间类型
基础教程推荐
猜你喜欢
- SQL Server中Table字典数据的查询SQL示例代码 2023-12-29
- MongoDB固定集合使用方法详解(详细步骤) 2024-01-13
- mongodb的安装和开机自启动详细讲解 2023-07-15
- 如何实现千万级优惠文章的优惠信息同步 2024-02-11
- MySQL之常用的MySQL优化工具解读 2023-12-13
- Redis高可用之持久化 2023-07-13
- python 操作redis 2023-09-12
- centos离线安装mongodb-database-tools方法详解 2023-07-16
- mysql数据库修改数据表引擎的方法 2023-12-11
- 如何使用Numpy创建三维矩阵 2023-07-28
