Skip to content
Advertisement

Return decimal value in SQL query

Example of script

but it comes back as a whole number, how can I get decimals?

Advertisement

Answer

Here are two options. First, you could force an implicit cast by introducing a decimal into the calculation:

An alternative would be to use an explicit cast to decimal:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement