我需要从table_A中提取一些记录,然后将这些记录插入table_B。我有以下伪代码:
insert into table_B (select * from table_A)
我想知道上面伪代码的正确语法是什么?谢谢!
答案 0 :(得分:0)
假设两个表都有匹配的列集,您可以这样做:
spec.ts: var mo = require("../page/mo.ts")
var testData = require('../testdata/testdata.json');
testData.forEach(function (data) {
it('create and save master obligation', function () {
browser.sleep(10000);
mo.createbutton();
browser.sleep(10000);
mo.MasterObligationName(data.Master_Obligation_Name)
mo.Module(data.Module);
mo.Location(data.Location);
mo.CentralObligation(data.Central_Obligation);
mo.Type(data.Type);
mo.Years(data.Years);
mo.Periods(data.Periods);
mo.Forms(data.Forms);
mo.Reports(data.Reports);
mo.savebutton();
})
})
如果table_b只有table_a的列子集,请手动选择它们,如:
insert into table_b select * from table_a;