oracle ORA-00928: 插入数据时缺少 SELECT 关键字
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7021362/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 00:14:47 来源:igfitidea点击:
ORA-00928: missing SELECT keyword when inserting data
提问by Deepa
I am trying to insert data into database but I am getting this exception:
我正在尝试将数据插入数据库,但出现此异常:
java.sql.SqlException:[Oracle][ODBC]ORA-00928:missing SELECT keyword
java.sql.SqlException:[Oracle][ODBC]ORA-00928:缺少 SELECT 关键字
回答by p.campbell
It sounds like you're trying to insert data into an Oracle table. Try formulating a statement like this:
听起来您正在尝试将数据插入 Oracle 表中。尝试制定这样的声明:
INSERT INTO MyTable(Column1, Column2)
VALUES (1, 'SomeString');
or
或者
INSERT INTO MyTable(Column1, Column2)
SELECT Foo, Bar
From MySecondTable;