当前位置:网站首页>Empty difference between postgrepsql and Oracle

Empty difference between postgrepsql and Oracle

2022-06-11 08:16:00 Want Xiaoxin

pg In the database null Unlike empty strings ,oracle Empty strings and null identical .
pg database

  select*
        FROM t_dc_bill_core_task_his where para is null  and sid ='c0f24d51-8296-449f-bfeb-5fc439a7eba5'

 Insert picture description here We can't find out , It's actually there

  select*
        FROM t_dc_bill_core_task_his where  sid ='c0f24d51-8296-449f-bfeb-5fc439a7eba5'

 Insert picture description here It can be found by using the executed function

  select*
        FROM t_dc_bill_core_task_his where  f_xdo_nvl(para ,'') = '' and  sid ='c0f24d51-8296-449f-bfeb-5fc439a7eba5'

 Insert picture description here

Functional DDL
 Insert picture description here


CREATE OR REPLACE FUNCTION DC_BILL.F_XDO_NVL(expr1 NVARCHAR2, expr2 NVARCHAR2)
  RETURN NVARCHAR2 AS
BEGIN
  RETURN NVL(expr1, expr2);
END;
原网站

版权声明
本文为[Want Xiaoxin]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203020513376176.html