sql - Mysql result include e+07, how can we escape e+07 from the result -
if export result mysql csv file value shown normal, once execute select command mysql result shown x.xxxxxe+07
exp:
select mycolumn mytable mycolumn=25744130;
the result following
2.57441e+07 2.57441e+07 2.57441e+07 ...
is there way avoid such kind display?
first of - please, note, in common case it's not true that, example, 2.57441e17
257441000000000000
- because of lack of significant digits. also, in such case won't able fractional part.
assuming want output zero-filled result without fractional part, can use format()
:
select replace(format(f, 0), ',', '') t
like:
mysql> select v, replace(format(v, 0), ',', '') t; +------------+--------------------------------+ | v | replace(format(v, 0), ',', '') | +------------+--------------------------------+ | 2.57441e17 | 257441000000000000 | +------------+--------------------------------+ 1 row in set (0.00 sec)
this result in string value, csv values strings (so it's matter of interpretation).
Comments
Post a Comment