What MYSQL INTERVAL() function returns if there is no bigger number in the list of arguments than the number at first argument?

MySQLMySQLi Database

In this case, MySQL INTERVAL() function returns the index number of the last number in argument list plus 1. In other words, the last index number in the list plus 1 would be returned by this function. 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)
Published on 21-Feb-2018 10:10:59