Alter the cost of products using phpmyadmin sql query

You shouldn’t use a SQL query. You can do this programatically.

$price = get_post_meta( $product_id, '_price');
$price += 100; // use -= 100 to subtract
update_post_meta($product_id, '_price', $price);
update_post_meta($product_id, '_regular_price', $price);