在 SQL* Plus 中的分号后插入新行
Insert new line after semicolon in SQL* Plus
我想 运行 在 SQL 加上 table 中的插入脚本,其中值在分号后有一个新行。我可以使用命令
插入新行
SET SQLBLANKLINES ON
但是当我尝试插入一个在分号后有新行的字符串时,出现错误
ORA-01756: quoted string not properly terminated
和
unknown command beginning "Bye;',..." - rest of line ignored.
当我尝试像这样插入时
INSERT INTO M_TABLE VALUES('Hi!
My Name is Tom;
Bye', 0)
SQL*Plus 将分号解释为语句终止符。
您可以将其更改为其他字符,或暂时停止识别它via the client settings:
set sqlterminator off
INSERT INTO M_TABLE VALUES('Hi!
My Name is Tom;
Bye', 0)
/
set sqlterminator on
整个插入语句现在 为 ended and submitted with a slash on a new line,因为现在仅在末尾粘贴分号将无法识别。
我想 运行 在 SQL 加上 table 中的插入脚本,其中值在分号后有一个新行。我可以使用命令
插入新行SET SQLBLANKLINES ON
但是当我尝试插入一个在分号后有新行的字符串时,出现错误
ORA-01756: quoted string not properly terminated
和
unknown command beginning "Bye;',..." - rest of line ignored.
当我尝试像这样插入时
INSERT INTO M_TABLE VALUES('Hi!
My Name is Tom;
Bye', 0)
SQL*Plus 将分号解释为语句终止符。
您可以将其更改为其他字符,或暂时停止识别它via the client settings:
set sqlterminator off
INSERT INTO M_TABLE VALUES('Hi!
My Name is Tom;
Bye', 0)
/
set sqlterminator on
整个插入语句现在 为 ended and submitted with a slash on a new line,因为现在仅在末尾粘贴分号将无法识别。