LiveSQL 不断向我显示:ORA-00933:SQL 命令未正确结束

问题描述:

INSERT INTO Countries (Country, Capital, Cities)
VALUES ('Philippines','Manila',122),
    ('USA','Washington',19495),
    ('Brazil','Brasilia',1642),
    ('Latvia','Riga',9),
    ('Egypt','Cairo',124)
;

我尝试删除(Country, Capital, Cities),将其重新贴上,将它们全部放在同一行中,放置更大的缩进,将它们分开.没有什么.它不断向我抛出此错误:ORA-00933:SQL 命令未正确结束..我的代码有什么问题?

I've tried removing the (Country, Capital, Cities), sticking it back on, putting them all in the same line, putting bigger indents, spacing them out. nothing. It keeps throwing me this error: ORA-00933: SQL command not properly ended.. What's wrong with my code?

Oracle 不支持使用单个 values 插入多行.我发现最简单的方法是 insert ...选择:

Oracle doesn't support inserting multiple rows using a single values. I find that the simplest method is insert . . . select:

INSERT INTO Countries (Country, Capital, Cities)
    SELECT 'Philippines', 'Manila', 122 FROM DUAL UNION ALL
    SELECT 'USA', 'Washington', 19495 FROM DUAL UNION ALL
    SELECT 'Brazil', 'Brasilia', 1642 FROM DUAL UNION ALL
    SELECT 'Latvia', 'Riga', 9 FROM DUAL UNION ALL
    SELECT 'Egypt', 'Cairo', 124 FROM DUAL;