NULLIF FUNCTION IN ORACLE SQL PLSQL TUTORIAL WITH EXAMPLE

Published: 12 April 2024
on channel: internet-tutors
14
0

NULLIF FUNCTION IN ORACLE SQL PLSQL TUTORIAL WITH EXAMPLE
NULLIF:
It is said to be SQL general function.
It will compare the first input parameter value with the second parameter value, if both the first input and second input parameter values are  same,
then,it will return as NULL as value. Otherwise, it will return first input parameter as the value.
NULLIF(expr1,expr2)

SELECT NULLIF('C','C') AS OUTPUT FROM DUAL;

SELECT NULLIF('M','N') AS OUTPUT FROM DUAL

select nullif ('x','y') as output from dual;

SELECT NULLIF('NULL','X') AS OUTPUT FROM DUAL;

SELECT NULLIF(NULL,X) AS OUTPUT FROM DUAL;

select * from emp;

SELECT LENGTH(ENAME) "expr1", LENGTH(JOB) "expr2", NULLIF(LENGTH(ENAME), LENGTH(JOB)) OUTPUT from emp;


On this page of the site you can watch the video online NULLIF FUNCTION IN ORACLE SQL PLSQL TUTORIAL WITH EXAMPLE with a duration of hours minute second in good quality, which was uploaded by the user internet-tutors 12 April 2024, share the link with friends and acquaintances, this video has already been watched 14 times on youtube and it was liked by 0 viewers. Enjoy your viewing!