ISNULL and NULLIF SQL SERVER

Publicado em: 06 Fevereiro 2022
no canal de: Vikash DBA (RDMS tutorial)-SQL GUIDE
985
9

Difference between ISNULL and NULLIF SQL SERVER?
please watch complete so you can understand the difference

ISNULL (Transact-SQL)
ISNULL ( check_expression , replacement_value )
--first argument is NULL so function return the second argument
SELECT
ISNULL(NULL,1)

--character string example
--first argument is not null so it returned first argument only
SELECT
ISNULL('DBA', 'SQL')


NULLIF
--For example,
returns NULL for the first column (3 and 3)
because the two input values are the same

SELECT NULLIF(3,3)
go
select NULLIF(6,7) -- returns the first value (6)
--because the two input values are different.

SELECT NULLIF('DBA', 'DBA')
SELECT NULLIF('SQL', 'DBA')


Nesta página do site você pode assistir ao vídeo on-line ISNULL and NULLIF SQL SERVER duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Vikash DBA (RDMS tutorial)-SQL GUIDE 06 Fevereiro 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 985 vezes e gostou 9 espectadores. Boa visualização!