0
Interval() function in sql(the one returning index value)
the descriptions online(w3schools and mysql doc) is not clear, can someone please explain it with a real time example if possible. thanks
1 Answer
+ 1
Example: MySQL INTERVAL() function
The following MySQL statement the 1st number is 85, which is less than 175. All other numbers in the argument are smaller than 85. So, it returns the index of 175. Notice that indexing is started with the 2nd number and first position is zero.
Code:
SELECT INTERVAL(85, 1, 75, 17, 30,56, 175);