MySQL DIV OPERATOR
DIV OPERATOR
MySQL div operator is used for integer division.
Syntax:
expression DIV num
Arguments:
Name | Description |
---|---|
expression | An expression which contains the dividend. |
num | Divisor. |
Pictorial presentation of MySQL DIV() operator
Example of MySQL DIV() OPERATORS
Code:
SELECT 12 DIV 3;
Explanation:
The above MySQL statement divides 12 by 3.
Sample Output:
mysql> SELECT 12 DIV 3; +----------+ | 12 DIV 3 | +----------+ | 4 | +----------+ 1 row in set (0.02 sec)
All Mathematical Functions
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework