In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly explains "how to judge whether the current time is between the start time and the end time under the condition that the mysql start and end time is allowed to be empty". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought. Let's study and learn how to determine whether the current time is between the start and end times when the mysql start and end times are allowed to be empty.
Catalogue
Requirements: query active data in progress
The following sql queries the result sets that meet the above four requirements, reaching the title requirements.
Requirements: query active data in progress
There are the following situations in progress:
1. The start time is empty, the end time is empty, and the resulting data will always be data in progress
two。 If the start time is empty and the end time is not empty, the current time is before the end time and is the data in progress
3. If the start time is not empty and the end time is empty, the current time is after the start time and is the data in progress
4. If the start time is not empty and the end time is not empty, the data within the start and end time period of the current time is in progress
The following sql queries the result sets that meet the above four requirements, reaching the title requirement SELECT * FROM table name WHERE 1 and (start_time is null or start_timenow ())
Mybatis. The input parameters of start time and end time are allowed to be empty.
As shown in the figure:
AND id in (select id from rht_product_price where 1 and start_date = # {record.endDate,jdbcType=VARCHAR}) Thank you for your reading. This is the content of "how to judge whether the current time is between the start time and the end time when the mysql start and end times are allowed to be empty". After the study of this article I believe you have a deeper understanding of how to judge whether the current time is between the start and end time under the condition that the mysql start and end time is allowed to be empty, and the specific use needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.