• Howard has provided a pretty good explanation. Use ISNULL when you only have 2 option, COALESCE with more than 2. They also handle data types and lengths differently. Try this:

    SELECT

    ISNULL(Nullif('abc', 'abc'), '123456') AS using_isnull,

    COALESCE(Nullif('abc', 'abc'), '123456') AS using_coalesce,

    ISNULL(Nullif('abc', 'abc'), 123456) AS int_using_isnull,

    COALESCE(Nullif('abc', 'abc'), 123456) AS int_using_coalesce