float value "0.00007136" is stored as "7.136E-05" in azure sql database

Pankaj Joshi 391 Reputation points
2025-06-17T15:06:08.2133333+00:00

I have a table with float column and trying to insert value "0.00007136" but it end up showing as "7.136E-05"

I have tried cast float , cast decimal, everything but still it is adding in table like that.

I am using simple insert statement and executing in microsoft sql server management studio

Please advise?

Azure SQL Database
{count} votes

1 answer

Sort by: Oldest
  1. Balmukund 176 Reputation points Microsoft Employee
    2025-06-17T16:01:53.23+00:00

    The value 0.00007136 being displayed as 7.136E-05 is due to how SQL Server (and many other systems) format floating-point numbers. This is a display formatting issue, not a data accuracy issue.

    DROP TABLE IF EXISTS t1
    GO
    CREATE TABLE t1 (i INT, j FLOAT)
    GO
    INSERT INTO t1 VALUES (1, 0.00007136)
    GO
    SELECT j,   CAST(j AS NUMERIC(10,8)), 
    			CAST(j AS DECIMAL(10,8)), 
    			FORMAT(j, '0.00000000')  
    FROM t1
    
    
    

    User's image


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.