date processing function
If you need to use dates when comparing with the WHERE clause, use Date(). This can avoid errors caused by the same day, but the hour, minute and second are not 00:00:00, for example:
SELECT cus_id, order_num FROM orders WHERE Date(order_date) = '2022-06-06';
If we want to retrieve all orders in June 2022, we need to take into account the number of days in different months. Here we recommend using the BETWEEN keyword:
SELECT cus_id, order_num FROM orders WHERE Date(order_date) BETWEEN '2022-06-01' AND '2022-06-30';
Numerical processing functions
Commonly used are as follows:
Reference: Forta B. MySQL crash course[M]. Pearson Education India, 2006.
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。