For the complete documentation index, see llms.txt. This page is also available as Markdown.

intDivOrZero

This section contains reference documentation for the intDivOrZero function.

Same as intDiv but returns zero when dividing by zero or when dividing Long.MIN_VALUE by -1.

Signature

intDivOrZero(col1, col2)

Argument
Type
Description

col1

DOUBLE

Dividend

col2

DOUBLE

Divisor

Returns: LONG

Usage Examples

SELECT intDivOrZero(10, 3) AS value
FROM myTable
value

3

SELECT intDivOrZero(10, 0) AS value
FROM myTable
value

0

Last updated

Was this helpful?