Home > Interview Questions > SQL Server > Select 1/2 what is the result of this query?

Select 1/2 what is the result of this query?

by SARNAM SINGH   on 03/05/2016   Category: SQL Server   |  Level: Intermediate   |  Views: 453    |  Points: 25     |  Silver 


It will result to 0 , because sql engine will look for datatype of its parameter, based on parameter type resultset data type determine. so internally it will it as 0.5 but because both parameters are of type integer so resut will be converted to ineger implicitly. see data type precedence for more information.


« select 1/2*1. ???
» Can we define WCF Service contract on class rather than interface?
Post Question  |  Question Home

Recent Posts

User Responses


No response found, be the first to review this question.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts