2作品:
INSERT INTO data._top
SELECT * FROM data.ops
WHERE ID = 'foo'
使用:
SELECT ID FROM data.table
如何使用Mysql
组合上述2个语句INSERT INTO data._top
SELECT * FROM data.ops
WHERE (SELECT ID FROM data.table)
答案 0 :(得分:1)
你可能会这样:
INSERT INTO `data._top`
SELECT * FROM `data.ops`
WHERE `id` IN (SELECT `id` FROM `data.table`);