formatting - MySQL DECIMAL(3,2) trailing zeros not showing -
how can trailing zeros type decimal(3,2) show?
for example, if insert value 1.50, queries show 1.5 instead. see screenshot below. schema on left, query on right, , results displayed @ bottome. thanks!
assuming asking observe in mysql directly, should first noted though trailing zeros may missing in query output, precision internally should not affected.
if want retain full width of decimal
, can try either of following:
select cast(unit_price char)
or
select concat(unit_price)
Comments
Post a Comment