What is nvl in sql query




















Skip to content. Change Language. Related Articles. Table of Contents. Save Article. Improve Article. Like Article. Recommended Articles. Article Contributed By :.

Easy Normal Medium Hard Expert. If expr1 is numeric, then Oracle determines which argument has the highest numeric precedence, implicitly converts the other argument to that datatype, and returns that datatype. The following example returns a list of employee names and commissions, substituting "Not Applicable" if the employee receives no commission:. The implicit conversion is implemented as follows: If expr1 is character data, then Oracle Database converts expr2 to the datatype of expr1 before comparing them and returns VARCHAR2 in the character set of expr1.

Summary : in this tutorial, you will learn how to use the Oracle NVL function to substitute null with a more meaningful alternative. The Oracle NVL function allows you to replace null with a more meaningful alternative in the results of a query.

The NVL function accepts two arguments. If e1 evaluates to null, then NVL function returns e2. If e1 evaluates to non-null, the NVL function returns e1.



0コメント

  • 1000 / 1000