LiveSQL 不断向我显示:ORA-00933:SQL 命令未正确结束 [英] LiveSQL keeps showing me this: ORA-00933: SQL command not properly ended

查看:112
本文介绍了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;

这篇关于LiveSQL 不断向我显示:ORA-00933:SQL 命令未正确结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆