HomeХобби и стильRelated VideosMore From: Database Star

Oracle NVL2 Function

2 ratings | 234 views
https://www.databasestar.com/oracle-nvl-nvl2-logical-functions/ The Oracle NVL2 function is an extension of the NVL function and can be used to handle NULL values. It allows you to specify a value to check for NULL, a separate value to return if the value is NULL, and another value to return if the first value is not NULL. It’s very similar to NVL but allows for more flexibility. The syntax for NVL2 is: NVL2( value_to_check, value_if_not_null, value_if_null ) What are these parameters: Value_to_check is the value the function checks to see if it is NULL. Value_if_not_null is the value to return if the first value, value_to_check, is not NULL. Value_if_null is the value to return if the first value, value_to_check, is NULL. These parameters can have almost any data type (the second and third parameter can’t be a LONG data type). Oracle will determine the data type from the supplied parameters. There are quite a few of these conditional checking functions in Oracle, so the one to use would depend on your needs. But it’s good to know this function exists. For more information about the Oracle NVL2 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 (0)

Would you like to comment?

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