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

php - trouble displaying mysqli database results in correct order -

depending on nth recurrence of job in control M -

sql server - Cannot query correctly (MSSQL - PHP - JSON) -