By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Records: 14 Duplicates: 0 Warnings: 0
| meta_id | post_id | meta_key | meta_value |
|---|---|---|---|
| 6677043 | 36828 | _sale_price | 439.2 |
| if (exists(SELECT 1 from wp_postmeta WHERE post_id=36828 and meta_key="_sale_price" ) , @sql := 'UPDATE `wp_postmeta` SET meta_value = 100 WHERE post_id=36828 and meta_key="_sale_price" ', @sql := 'INSERT INTO wp_postmeta ( `post_id`, `meta_key`, `met |
|---|
| UPDATE `wp_postmeta` SET meta_value = 100 WHERE post_id=36828 and meta_key="_sale_price" |
Statement prepared
Rows matched: 1 Changed: 1 Warnings: 0
| meta_id | post_id | meta_key | meta_value |
|---|---|---|---|
| 6677043 | 36828 | _sale_price | 100 |