In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-07 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to obtain records in a certain period of time in mysql database". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how the mysql database can obtain records within a certain period of time".
Generally speaking, when we record the data time in the mysql database, we will choose the datatime type, so that the time can be accurate to seconds. But one of the problems that comes with it is that when we want to get the data content over a certain period of time, there will be some trouble in time conversion. For example, if we want to get the content from March 2, 2002 to July 8, 2003, our first intuition is that we should write sql in the following form:
Select * from yourdb where sj > = '2002-3-2' and sj=to_days ('2002-3-2') and sj= TO_DAYS (a.beginDate)
And TO_DAYS (NOW ()) < TO_DAYS (a.endDate)
At this point, I believe you have a deeper understanding of "how the mysql database obtains records within a certain period of time". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.