文章詳情頁
mysql - 請問數(shù)據(jù)庫字段為年月日,傳進的參數(shù)為月,怎么查詢那個月所對應的數(shù)據(jù)
瀏覽:169日期:2022-06-13 14:52:29
問題描述
問題解答
回答1:select * from table WHERE date_format(date,’%Y-%m’) = ’2017-3’
如果你需要前面加年份的話,可以使用數(shù)據(jù)庫函數(shù)date_format格式可以參看這篇文章http://blog.csdn.net/kangbrot...
排行榜

熱門標簽
網(wǎng)公網(wǎng)安備