我有这个插入语句
INSERT INTO mytable VALUES
('val1', 'val2'),
('aa', 'cc'),
('ww', 'dd');
我收到了这个错误 ORA-00933:SQL命令未正确结束
答案 0 :(得分:17)
你正在使用oracle,试试这个
INSERT ALL
INTO mytable ("id", "name")
VALUES ('val1', 'val2')
INTO mytable ("id", "name")
VALUES ('aa', 'cc')
INTO mytable ("id", "name")
VALUES ('ww', 'dd')
SELECT * FROM dual ;
或简单
INSERT INTO mytable ("id", "name") VALUES ('val1', 'val2');
INSERT INTO mytable ("id", "name") VALUES ('aa', 'cc');
INSERT INTO mytable ("id", "name") VALUES ('ww', 'dd');