In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article will explain in detail how to use BETWEEN AND in MSSQL SERVER. The content of the article is of high quality. Therefore, Xiaobian shares it with you as a reference. I hope you have a certain understanding of relevant knowledge after reading this article.
SQL used:
SELECT ID, Name, RegisterDateFROM CustomerWHERE (RegisterDate BETWEEN '2007-01-06' AND '2007-01-06')
The result was 1: Tinker Tinker, as I expected.
But what if Tintin's RegisterDate time isn't 00:00:00?
If the data is like this
IdNameRegisterDate1 Peng Peng 2007/1/5 00:00:002 Ding Ding 2007/1/6 04:37:003 Asia Asia 2007/1/7 00:00:00
The same SQL.
SELECT ID, Name, RegisterDateFROM CustomerWHERE (RegisterDate BETWEEN '2007-01-06' AND '2007-01-06')
0 came back.
Um, because I didn't give the correct time range, my query condition should be the whole day time range of January 6, 2007.
So I usually add 1 day to the date before I query the program
RegisterMaxDate = RegisterMaxDate.AddDays(1);
But is that right
The SQL generated by such a program is
SELECT ID, Name, RegisterDateFROM CustomerWHERE (RegisterDate BETWEEN '2007-01-06' AND '2007-01-07')
Instead, he sent back two strokes, sending Yaya back.
Because between min And max of Sql is value >=min && value ="and" and "=" and "Figure 4.22 Query BookInfo records published between May 1, 2004 and January 1, 2006
How to use BETWEEN AND in MSSQL SERVER is shared here. I hope the above content can be of some help to everyone and learn more knowledge. If you think the article is good, you can share it so that more people can see it.
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.