
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
Why is it good to write the numbers in MySQL INTERVAL() function in ascending order?
Actually, INTERVAL() function uses the binary search for searching the bigger number than the number at first argument. So, that is why if we want INTERVAL() function to work efficiently the list of numbers would be in ascending order. Following is a good way to use INTERVAL() function −
mysql> Select INTERVAL(50,20,32,38,40,50,55);
- Related Articles
- Write the following numbers in ascending order: $98003456; 98002368; 98000345; 98004567; 98006788$
- MySQL command to order timestamp values in ascending order?
- Is it possible to divide records in both ascending and descending order in MySQL and display them alternatively?
- MySQL command to order timestamp values in ascending order without using TIMESTAMP()?
- Order MySQL records randomly and display name in Ascending order
- What is MySQL INTERVAL() function?
- Arrange the following numbers in ascending order:$9801, 25751, 36501, 38802$
- Is it possible to sort varchar data in ascending order that have both string and number values with MySQL?
- Sorting numbers in ascending order and strings in alphabetical order in an array in JavaScript
- Why is it not good practice to use date values with two-digits years in MySQL?
- How can we sort MySQL output in ascending order?
- Write the following integers in ascending order: $(smallest to biggest)$: $-5, 2, 1, -8$.
- What is ascending order?
- Select last 20 records ordered in ascending order in MySQL?
- Program to find the minimum cost to arrange the numbers in ascending or descending order in Python

Advertisements