chapter 5.2 Flashcards
what are nested functions
it refers to functions being contained within another function
how are nested functions evaluated
evaluation process begins from the innermost level to the outermost level
what does the next_day() function do ?
The next_day function returns the first day of that month
_________ is the value that is unavailable, unassigned, unknown or inapplicable
Null
what are 4 different functions oracle has that pertain to the use of null values
NVL
NVL2
NULLIF
COALESCE
what does the NVL function do
converts a null value to a known value of a fixed data type, either date, character, or number
rule of NVL function
data types of null value column and the new value must be the same
NVL synatax
NVL(column with null values, value to substitute for null)
what happens when arithmetic calculation is performed with null
result is null
nvl2 function evaluates the expression with ________ values
3
how does NVL2 work
if the first values is not null, then the first expression is returned
if the first value is null, then the third expression is returned
what are the data type restrictions in NVL2
values in expression 1 can have any data type
expression 2 and expression 3 can have any data type except LONG
what is the data type returned in NVL2
The data type of the returned value is always the same as the data type of expression 2, unless expression 2 is character data, in which case the returned type is varchar2
what does the NULLIF function do
compares 2 expressions and if they are equal, the function returns null
if they are not equal, the function returns the first expression
what is the coalesce function is extension of _______
NVL function