Select from following answers:- Select 1/2 is 0.5
- Select 1/2 is 0.0
- Select 1/2 is 0
- All the above
- All Above
The answer is 0. Since the datatype of numerator and denominator both are integer, hence the result-set has a datatype of integers. Though the result should be 0.5 but since the return type is integer and not float, so SQL Server will convert that to 0.
Show Correct Answer
Asked In: Many Interviews |
Alert Moderator