Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/78.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何知道整个sql脚本中有新行?_Sql_Oracle Sqldeveloper - Fatal编程技术网

如何知道整个sql脚本中有新行?

如何知道整个sql脚本中有新行?,sql,oracle-sqldeveloper,Sql,Oracle Sqldeveloper,例如:- 我的剧本是:- Insert into employee(id,ename,description) values(1, 'abc', 'there is new line'); 如果此脚本在sql*plus中运行,则获取错误,而在sql developer中运行则会成功运行 在sqldeveloper中运行脚本时,如何捕获该特定错误(sqldeveloper应该通过该错误) 谢谢。我想你是说你的代码: Insert into employee (id, ena

例如:-

我的剧本是:-

Insert into employee(id,ename,description) 
values(1,
   'abc',
   'there is

   new line');
如果此脚本在sql*plus中运行,则获取错误,而在sql developer中运行则会成功运行

在sqldeveloper中运行脚本时,如何捕获该特定错误(sqldeveloper应该通过该错误)


谢谢。

我想你是说你的代码:

Insert into employee (id, ename, description) values(1,'abc', 'there is new line');
仅适用于sql developer,但不适用于sqlplus? 你的代码是正确的,我甚至试过以防万一

检查ename和description列的类型是否有足够的空间(不能在varchar2(4)中放入单词“Hello”)。另外,分享您用来创建困扰您的表的代码

确保每个命令之间至少有一个空格

此外,请尝试以下方法:

Insert into employee (id, ename, description) values('1', 'abc', 'there is new line');

我认为OP是说SQL*Plus不允许CR在描述值的中间——你已经删除了CR,当然是你的代码。works@Jovan我想你不明白我想说的是,没错,ChistalPalMer-SlPlus不允许CR在描述值的中间(get错误MSG)。但在sqldeveloper中,它工作得很好(但sqldeveloper应该通过与sqlplus相同的错误消息),在sqlplus中使用
将SQLBLANKLINES设置为OFF