获得当前日期+时间(date + time)1.1 函数:now()
相关函数:current_timestamp(),localtime(),localtimestamp()
举例说明:
2. 获得当前日期(date)
函数:curdate()
相关函数:current_date(),current_date
举例说明:
3. 获得当前时间(time)
函数:curtime()
相关函数:current_time(),current_time
举例说明
安装、修复、更新或打包一个基于 Python 和 PyMySQL 实现的 Windows `mysql` 命令。适用于用户希望在 PowerShell/CMD 中输入 `mysql` 时重定向到 Python 实现、需要交互式输入 MySQL 连接信息、需要同步到当前用户本地 bin 目录,或需要将该能力封装成可公开复用的 Codex skill。
4. MySQL dayof…
函数:dayofweek(), dayofmonth(), dayofyear()分别返回日期参数,在一周、一月、一年中的位置。
举例说明
set @dt = '2008-08-08';
select dayofweek(@dt); -- 6
select dayofmonth(@dt); -- 8
select dayofyear(@dt); -- 221
日期‘2008-08-08′ 是一周中的第6 天(1 = Sunday, 2 = Monday, …, 7 = Saturday)
一月中的第8 天;一年中的第221 天










