Shaw
Shaw

Reputation: 41

Add 2 decimal place in number in Mysql (without rounding up)

For example 36829 become 368.29 I just want to add 2 decimal place

 Cent   | RM    
 36829  | 368.29

Column name cent and I want to convert to RM which just need to add 2 decimal place.

Upvotes: 1

Views: 666

Answers (1)

Smita Ahinave
Smita Ahinave

Reputation: 1888

select Cent,format(Cent/100,2) from yourtable;

Upvotes: 2

Related Questions