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 sql injection owasp?
What are the two types of cursors in pl sql?
what is a database? : Sql dba
What does the file extension accdb stand for?
What is a dynamic query?
What is a loop in sql?
What is pl sql package?
Why are sql stored procedures used?
Is left join inner or outer?
how to drop an existing view in mysql? : Sql dba
What is the difference between delete and truncate statement in sql?
What is the process of copying data from table a to table b?
Explain select statements in sql?
Explain how you can copy a file to file content and file to pl/sql table in advance pl/sql?
What is a primary key called that is made up of more than one field?