这是我尝试过的MySQL代码:
"INSERT INTO wpcustom_productmeta.wpc_productmeta(brand,model,country,carrier)
VALUES (SELECT meta_value FROM wordpress.wp_postmeta WHERE meta_key='brand'),
(SELECT meta_value FROM wordpress.wp_postmeta WHERE meta_key='model'),
(SELECT meta_value FROM wordpress.wp_postmeta WHERE meta_key='country'),
(SELECT meta_value FROM wordpress.wp_postmeta WHERE meta_key='carrier')";
我想从单独的数据库和表wpcustom_productmeta.wpc_productmeta
将数据插入wordpress.wp_postmeta
,但我只想选择特定的列。
以下是两个表格的结构: