Home >Database >Mysql Tutorial >What does the MYSQL INTERVAL() function return if there is no number in the parameter list that is greater than the number of the first parameter?

What does the MYSQL INTERVAL() function return if there is no number in the parameter list that is greater than the number of the first parameter?

王林
王林forward
2023-08-25 11:37:041255browse

如果参数列表中没有比第一个参数的数字更大的数字,那么 MYSQL INTERVAL() 函数返回什么?

In this case, the MySQL INTERVAL() function returns the index number of the last number in the parameter list plus 1. In other words, adding 1 to the last index number in the list will return this function. The following example will demonstrate it -

mysql> Select INTERVAL(50,20,32,38,40);
+--------------------------+
| INTERVAL(50,20,32,38,40) |
+--------------------------+
| 4                        |
+--------------------------+
1 row in set (0.00 sec)

The above is the detailed content of What does the MYSQL INTERVAL() function return if there is no number in the parameter list that is greater than the number of the first parameter?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete