I have 5000+ products in WooCommerce and I'm looking for a SQL query to set their barcodes based on their SKU. Both "barcode" and "sku" are custom posts meta. Basically, something like:
UPDATE wp_postmeta SET barcode='x' WHERE sku='y';
But it doesn't work because barcode and sku are not real table columns. So, can anyone provide a working query? I'm new to SQL. Thank you!