I want to round the numbers to 2 decimal points in a woocommerce database table
There is a column '
meta_key' with row '_price' and a column 'meta_value' which has all kinds of data in it as well as the numbers that need to be rounded and reduced to two decimal places.
(I know I'll also have to do that for
I am a complete beginner with SQL. I've managed to do a few things in phpmyadmin by using the Search to give me the syntax or copying and changing answers found on the net, but this one has me stumped, just not enough knowledge yet.
I managed to add 10% to all the prices with this query -
update wp_postmeta set meta_value = meta_value * 1.10 where meta_key='_regular_price'
I've read that there's a 'ROUND' function, but not sure how to write the query.
I'm guessing it would be something like this -
UPDATE wp_postmeta ROUND meta_value where meta_key='_price'
Hope someone here can help