[Table1 Columns: Server, Site, App_Name]
[Table2 Columns: Event, Server, Site, App_Name]
INSERT INTO Table2 Values(Server, Site, App_Name)
SELECT * FROM Table2 WHERE Site IN ('ABC');
UPDATE Table2 SET Event = 'XYZ' WHERE Site IS NOT NULL;
我想为在 query1 中创建的所有行设置相同的事件值。如果我确实更新,它会破坏一些以前的数据。如何将第二个查询作为 INSERT 的一部分?