where should we put cast in the following situation.
bridgid
is bigint
in the table.
CAST(ISNULL(br.bridgid, 0) as bigint)
or
ISNULL(br.bridgid, cast(0 as bigint))
CAST(ISNULL(br.bridgid, 0) as bigint)
is correct because
ISNULL(br.bridgid, cast(0 as bigint))
will always return the datatype of br.brigid even if the second argument is a higher precedence. Thanks @AlexK
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments