简体   繁体   English

从MySQL数据库获取日期范围

[英]Get Date Range From MySQL database

How can I get the date range like month and year of the data from MySQL database? 如何从MySQL数据库获取数据的月份和年份的日期范围? For example if a table in database has the record of data from Feb 2012 to Jan 2013, how can I get to know the date range of stored data record? 例如,如果数据库中的表具有2012年2月至2013年1月的数据记录,那么如何才能了解存储数据记录的日期范围?

使用查询

select min(date_column), max(date_column) from your_table

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM