三亩地 三亩地SAN MU DI · CODE DIARY
ARTICLE DETAIL

日记详情

真实记录编程学习的某一天,欢迎挑你感兴趣的翻一翻。

oracle的26版本及以下 Null的判断及空串判定

oracle的26版本及以下 Null的判断及空串判定

官方文档:https://docs.oracle.com/en/database/oracle/oracle-database/26/sqlrf/Nulls.html#GUID-C785FE74-5F9C-4F70-AC4B-CA5D3010162A

The database currently treats a character value with a length of zero as null. However, this may not continue to be true in future releases, and Oracle recommends that you do not treat empty strings the same as nulls.

空串就是null。

判断描述

任何以= 或 != 与Null判断结果为Unknown。

// wrapper.ne(BaseDeptDO::getDeptName, “”); 这行代码就是deptname !=‘’ deptname != Null 结果为unknown,无论库里什么值,都查不出来

← 返回列表