The division operator computes the quotient of two values.
The division operator can be applied to INT or FLOAT columns or constants. The data type of the result is always a FLOAT. If the values of the second input column or constant (the divisor) is 0 (division by zero), the resulting value is set to NULL.
DIV ( table.column1 , table.column2 )
table.column1 / table.column2
If one of the input values is NULL, the result is NULL as well.
[1] | ||||||||||||||
| ||||||||||||||
|
[2] | ||||||||||||||
| ||||||||||||||
|
[3] | ||||||||||||||
| ||||||||||||||
|
[4] Divide a column of type INT by a constant INT value. Note, that the division by zero for the second and third row does not result in an error, but returns null: | |||||||||||||||||||
| |||||||||||||||||||
|
[5] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|