I have attended interview and below query output i din't understand.
In general, 1/2 and 1/2.0 is 0.50000 But in sql server i am getting different output:
1) output of :select 1/2 is 0
2) output of :select 1/2.0 is 0.50000
can please explain, why output is differenct and how the sql treats above 2 queries, how it works ?