I have the following SQL Server query:
SELECT ISNULL(MIN(P), 999) AS FLD
FROM (SELECT '0' AS P) AS T
WHERE (1 > 4)
How come the output of this query is '*' ?
Please explain
Thanks
ISNULL
uses the datatype of the first argument.
This is varchar(1)
as that is the datatype of the literal '0'
999
would be truncated so SQL Server shows '*'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With