formatting - MySQL DECIMAL(3,2) trailing zeros not showing -


enter image description herehow 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

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -