How to Round numbers in database to two decimal places using a MySql query

前端 未结 2 1368
感动是毒
感动是毒 2021-01-14 06:45

I want to round the numbers to 2 decimal points in a woo commerce database table wp_postmeta. There is a column \'meta_key\' with row \'_pric

2条回答
  •  無奈伤痛
    2021-01-14 07:08

    You can round your column with Round Function , Use function like this :

    SELECT ROUND(column_name,decimals) FROM table_name; 
    

    in this case write query like below :

    select Round(_Price , 2) from your table name
    

提交回复
热议问题