确保表为空后,您可以向表中插入多行
INSERT INTO Persons
SELECT personID, personName
FROM (
SELECT 1 as personID, "Jhon" as personName
UNION ALL
SELECT 2 as personID, "Steve" as personName
)
WHERE NOT EXISTS (SELECT 1 from Persons);
其中“UNION ALL”语句用于组合两个或多个“SELECT”语句的结果集
注意:Forpas在here编写了解决方案核心,但我编辑了语法以插入多行而不是一行