what will be te value and why?
NULL*5= ?
and
NULL+5= ?
what will be te value and why?
NULL*5= ?
and
NULL+5= ?
Regards,
Brijesh Jain
---------------------------------------------------------
Connect with me on Skype: jainbrijesh
Google Plus : jainbrijeshji
When a variable has no value, it considered to be null. Having a null value is different than having a value of 0, since 0 is an actual value. However, when used in a boolean test, both null and zero result in a FALSE value. Programmers often use boolean tests to determine whether a variable has been given a value or not.
Again...
In SQL, NULL is not a value. It is a state indicating that an item's value is unknown or nonexistent. It is not zero or blank or an “empty string” and it does not behave like any of these values. Few things in SQL lead to more confusion than NULL, and yet its workings shouldn't be hard to understand as long as you stick to the following simple definition: NULL means unknown.
NULL*5= NULL
and
NULL+5= NULL
For further reading please follow the link:
http://firebird.sourceforge.net/manu...l-in-exps.html
The value null can be regarded as an unknown value. Therefore,
select NULL*5 from dual; AND select NULL+5 from dual; return null value
This is because five plus an unknown value (5 * unknown value ) is of course unknown , hence Oracle returns null.
Of course in both the instances the result is NULL only.
Yes, that is the peculearity of NULL.
because
NULL <> NULL
and
NULL not <> NULL