跳到主要内容

DIVNULL

Introduced or updated: v1.2.345

Returns the quotient by dividing the first number by the second one. Returns NULL if the second number is 0 or NULL.

See also:

Syntax

DIVNULL(<number1>, <number2>)

Examples

SELECT
DIVNULL(20, 6),
DIVNULL(20, 0),
DIVNULL(20, NULL);

┌─────────────────────────────────────────────────────────┐
│ divnull(20, 6) │ divnull(20, 0) │ divnull(20, null)
├────────────────────┼────────────────┼───────────────────┤
3.3333333333333335NULLNULL
└─────────────────────────────────────────────────────────┘
开始使用 Databend Cloud
低成本
快速分析
多种数据源
弹性扩展
注册