Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Output for the below line is 1.6667, but in sql it displays as 1

SQL
select 25/15


Any suggestions
Thanks in advance
Posted

1 solution

Because this is the correct result of integer division you show in your code sample. Use 25.0/15 instead.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900