If I do
select 18000*13/100000
it returns 2
when it should return 2.34
How do I make it return the correct number?
thanks
If I do
select 18000*13/100000
it returns 2
when it should return 2.34
How do I make it return the correct number?
thanks
select 18000*13/100000.0
Use a float
either in numerator or denominator to get a float.
Use a decimal point to avoid integer division:
select 18000.0*13/100000
You can also CAST()
as DECIMAL
or FLOAT
a field, but I like to just use mycol *1.0