首页 > 数据库 >mysql 当年所有月份列表

mysql 当年所有月份列表

时间:2023-02-15 15:00:27浏览次数:35  
标签:now union mysql 当年 concat year 列表 select

-- 不依赖任何表,只是用mysql自带函数方法
select concat((select year(now())),'-01') as `date`
union select concat((select year(now())),'-02')
union select concat((select year(now())),'-03')
union select concat((select year(now())),'-04')
union select concat((select year(now())),'-05')
union select concat((select year(now())),'-06')
union select concat((select year(now())),'-07')
union select concat((select year(now())),'-08')
union select concat((select year(now())),'-09')
union select concat((select year(now())),'-10')
union select concat((select year(now())),'-11')
union select concat((select year(now())),'-12')

标签:now,union,mysql,当年,concat,year,列表,select
From: https://www.cnblogs.com/lxnv587/p/17123016.html

相关文章