First, let's take a look at SQL server. Previously, we used the foreground to select a start time and an end time (in the smallest unit of day), and then used it as a condition for query, if we use "between starttime and endtime" as the condition, we will automatically convert "" to "00:00:00 ", therefore, the following query condition is "between '2014-06-16 'and '2014-06-17'". Only data on the 16th day can be obtained. Data on the 17th day cannot be obtained, if you want to check the data on the 17th day, you can process the selected time: You can add detailed time conditions for it, for example, "between '2017-06-16 00:00:00 'and '2017-06-17 23:59:59'", or simply replace the end time with the date of the next day, however, we need to make a special processing on the incremental date, because we may encounter the situation of choosing the last day of the month, detailed I will not go into details here.
Let's talk about the processing in the oracle database, which is the same as the above two methods. But if we adopt the precise time method, we need to use the oracle database time function for processing, which is relatively cumbersome, it may be more convenient to directly increase the end date. Of course, the minimum unit of the selected date is "day. It should be noted that the date string format adopted in oracle is different from that of SQL server, generally in the format of "5-6-09, this requires an intermediate conversion of the obtained time format. Otherwise, the statement cannot be executed normally. Of course, we can also use database functions for processing, but it is relatively complicated.
In fact, sometimes we can take a more formal approach to deal with many problems. However, if there are some limitations within the scope of requirements, but the implementation method that can fully meet the needs, I think it can be used in a bold region, because the ultimate goal of our programming is: to achieve the goal in the simplest way, everything cannot be too rigid. This process is actually to improve our understanding of the project requirements. Finally, we need to pay attention to some of the issues that we must avoid when copying paths. Never be too careless.