From b2518077832cfc046162ed493d7b52f60c0c02a9 Mon Sep 17 00:00:00 2001 From: jokerzsd <2701819133@qq.com> Date: Wed, 9 Sep 2026 17:34:36 +0800 Subject: [PATCH] docs: add lnnvl function documentation Add the Oracle-compatible lnnvl function to the built-in functions table and its description section in both the English and Chinese docs. Closes #301 Signed-off-by: jokerzsd <2701819133@qq.com> --- CN/modules/ROOT/pages/7.8.adoc | 9 +++++++++ EN/modules/ROOT/pages/7.8.adoc | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/CN/modules/ROOT/pages/7.8.adoc b/CN/modules/ROOT/pages/7.8.adoc index 9c3d170d..15691ca5 100644 --- a/CN/modules/ROOT/pages/7.8.adoc +++ b/CN/modules/ROOT/pages/7.8.adoc @@ -75,6 +75,7 @@ |compose |decompose |sys_context +|lnnvl |==== == 内置函数说明 @@ -1150,4 +1151,12 @@ ivorysql=# select sys_context('USERENV','DB_NAME'); ivorysql (1 row) +``` +=== `lnnvl` 函数 +功能:当条件为 FALSE 或 UNKNOWN(NULL)时返回 TRUE,条件为 TRUE 时返回 FALSE。通常用于 WHERE 子句中,以包含条件为假或为 NULL 的行。测试用例如下: + +查询值不等于 10 或值为 NULL 的行: + +``` +select * from t where lnnvl(a = 10); ``` \ No newline at end of file diff --git a/EN/modules/ROOT/pages/7.8.adoc b/EN/modules/ROOT/pages/7.8.adoc index 8150dedf..b0f82f51 100644 --- a/EN/modules/ROOT/pages/7.8.adoc +++ b/EN/modules/ROOT/pages/7.8.adoc @@ -75,6 +75,7 @@ |compose |decompose |sys_context +|lnnvl |==== == Built-in function descriptions @@ -1149,3 +1150,11 @@ ivorysql=# select sys_context('USERENV','DB_NAME'); (1 row) ``` +=== `lnnvl` function +function: return TRUE if the condition is FALSE or UNKNOWN (NULL), and FALSE if the condition is TRUE. It is commonly used in a WHERE clause to also include rows whose condition evaluates to NULL. The test cases are as follows: + +Query the rows where the value is not equal to 10 or is NULL: + +``` +select * from t where lnnvl(a = 10); +```