Is there a better way to compare if two values โโare equal, if they can be zeros other than the following?
a = b or (a is null and b is null)
You can:
a=b or coalesce(a,b) is null
You can also use nvl , but this is an obsolete function, and coalesce is faster because it stops when the first non-zero
nvl
coalesce
You can use DECODE(A,B,1) = 1
DECODE(A,B,1) = 1
DECODE is irregular when handling NULL.
However, I think the intention is unclear and prefers vol7ron's answer. Clarity compared to the minimum character set!
You can wrap it with nvl and set it to some value not expected in your set:
NVL(a,0) = NVL(b,0)
Source: https://habr.com/ru/post/891413/More articles:Twitter / Facebook @mention function using jQuery - jqueryEmail setup in Code Igniter 2.02 - phprotate camera around center of wpf object - c #How can I perform mutation testing of my Java program? - javaArtifacts when enabling 4x MSAA anti-aliasing on iPad / iOS - iosSleeping in a thread causes a memory leak - c ++How to match a value in a PHP array and then find the key value? - variablesHow to override the ASP.NET MVC 3 model middleware to resolve dependencies (using ninject) during model creation? - c #C Strings: a simple question - c ++UITableView cell displays UITableView background color - objective-cAll Articles