第一次更新是:
UPDATE TABLE 1
INNER JOIN TABLE 2
ON (TABLE 1.Name = TABLE 2.Name)
AND (TABLE 1.Location = TABLE 2.Location)
SET
(
TABLE 1.Address = TABLE 2.NewAddress
)
WHERE (((TABLE 1.Name)= "Jack"));
第二次更新是:
UPDATE TABLE 1
SET TABLE 1.Locatio = "NewYork"
WHERE (((TABLE 1.Location) = "GZ"
OR (TABLE 1.Location) = "BJ")
AND ((TABLE 1.Name) = "Jack"));
我想使用一个查询将这两个更新组合在一起,或者对这两个查询进行任何改进????
谢谢!
答案 0 :(得分:0)
如果您真的想要合并这些查询,可以执行以下操作:
function* arrayIterator(arr: any[]) {
for (var i = 0; i < arr.length; i++) {
yield arr[i];
}
}
let array4 = [10, 20, 30];
var it4 = arrayIterator(array4);
console.log(it4.next()); // { value: 1, done: false }
console.log(it4.next()); // { value: 2, done: false }
console.log(it4.next()); // { value: 3, done: false }
console.log(it4.next()); // { value: undefined, done: true }