If it’s the first time you’re seeing a problem like this, it can be confusing. How can
15be less than
My first train of thought was the same as the original poster’s. Ok, so both values are converted to
varcharaccording to data type precedence – similar to this:
It’s not due to a varchar comparison, but Tomas does have an answer for us.