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 is the result of this query: "*"?
Please explain
thanks
ISNULL uses the data type of the first argument.
ISNULL
This is varchar(1) since it is the literal data type '0'
varchar(1)
'0'
999 will be truncated, so SQL Server shows '*'
999