You're forcing an implicit conversion to occur to make the data types match. This is all about type precedence
For a float
column, we have the data types float
and varchar
. float
wins, and we attempt to convert '0.0'
and '10.0'
to float
s and succeed.
For an int
column, we have the data types int
and varchar
. int
wins, and we attempt to convert '0.0'
and '10.0'
to int
s and fail.
Without the quotes, for an int
column, we have the data types int
and decimal
. decimal
wins, and we attempt to convert the int
column values to decimal
and succeed.