Following my previous question: Implicit conversion does not affect performance
I used below simple query
select count(*) from fpc where SKey in ('201701', '201702A')
SKey is of type int and I have non clustered columnstore index on it.
obviously I cannot run this because the second value is not a number. so I hit Ctrl+L to see estimated execution plan and I see an interesting thing in
[mydb].[dbo].[fpc].[SKey]=CONVERT_IMPLICIT(int,'201702A',0) OR [mydb].[dbo].[fpc].[SKey]=(201701)
My question is why SQL uses '201701' as a number but uses implicit conversion on the second value: '201702A'
what I'm interested in is the internal mechanism how SQL server looks into these two values. Does it know the first one is a number and the second one is not?