adspace
Answer Posted / avi007
In Oracle/PLSQL, the NULLIF function compares expr1 and
expr2. If expr1 and expr2 are equal, the NULLIF function
returns NULL. Otherwise, it returns expr1.
The syntax for the NULLIF function is:
NULLIF( expr1, expr2 )
expr1 and expr2 must be either numeric values or values
that are of the same datatype.
For example:
NULLIF(12, 12) would return NULL
NULLIF(12, 13) would return 12
NULLIF('apples', 'apples') would return NULL
NULLIF('apples', 'oranges') would return 'apples'
NULLIF(NULL, 12) would return an ORA-00932 error because
expr1 can not be the literal NULL
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
what is bcp? When does it used? : Sql dba
Do we need to rebuild index after truncate?
how many tables will create when we create table, what are they? : Sql dba
How do I remove duplicates in two columns?
Is inner join faster than left join?
what is collation? : Sql dba
what is schema? : Sql dba
Can we use distinct and group by together?
What is the current version of postgresql?
what are aggregate and scalar functions? : Sql dba
Is primary key clustered index?
What is the best sql course?
how to use regular expression in pattern match conditions? : Sql dba
define sql insert statement ? : Sql dba
how to start mysql server? : Sql dba