HomeНаука и техникаRelated VideosMore From: Database Star

Oracle NVL Function Explained with Examples

7 ratings | 201 views
https://www.databasestar.com/oracle-nvl-nvl2-logical-functions/ The Oracle NVL function allows you to check a value and return a different value if that value is NULL. It’s great for using another value if the first one is NULL or an optional value, for example people’s phone numbers. It’s also good alongside aggregate functions and grouping so you can see what the difference is between a subtotal row and an actual NULL value. The syntax of the Oracle NVL function is: NVL( check_value, replace_value ) The parameters are: - check_value (mandatory): This is the value that is displayed to the user. It is also the value that is checked for NULL. - replace_value (mandatory): This is the value that appears if the check_value is NULL. The function can use many different data types as parameters: string, date, or numeric. However, both parameters need to be the same type. For more information about the Oracle NVL function, including all of the SQL shown in this video and the examples, read the related article here: https://www.databasestar.com/oracle-nvl-nvl2-logical-functions/
Html code for embedding videos on your blog
Text Comments (6)
ElberFunez (14 days ago)
you should offer a course that prepares students for 0z1-061, 0z1-071 . you’re a great teacher
Database Star (13 days ago)
Thanks Elber, I'll keep that in mind!
ElberFunez (14 days ago)
do the parameters inside the NVL function have to be of the same data type?
ElberFunez (14 days ago)
thanks for the quick reply. i’m using your useful function cheat sheet
Database Star (14 days ago)
Yes, they must both be the same data type for the NVL function.
Shohag Heaven (4 months ago)
Thanks sir

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.