How to delete field using WPDB?

You can’t “delete” a field in MySQL, this only works for complete rows.

However, you can unset values, meaning setting them to their original state, usually NULL or an empty string.

$wpdb->update($wpdb->posts, array(
    'product_rank' => NULL
), array(
    'ID' => $post_id
));

error code: 523