运行 sql*plus 脚本时出错
我有一个脚本,它只需连接到 sql*plus 中的表并在表中插入一行。
它抛出如下错误:
SP2-0552: Bind variable "BIND" not declared
我无法准确弄清楚它试图插入的查询中的绑定变量是什么。
i have a script which simply connect to the table in sql*plus and inserts a row in the table.
it is throwing an error as below:
SP2-0552: Bind variable "BIND" not declared
i am not able to figure out exactly what the bind variable is in the query that it is trying to insert.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在尝试运行这样的 sql:
SQL*Plus 将
:BIND
标识为绑定变量,但您尚未在会话中声明该变量。要声明绑定变量,请使用 VAR(IABLE) 命令。然后,您可以为该变量赋值。
再次运行
select
以确认绑定变量现已设置。请注意,您还可以使用此变量来保存单行查询的结果。You are trying to run a sql like this:
SQL*Plus identifies
:BIND
as a bind variable, but you haven't declared one in your session yet. To declare the bind variable use theVAR(IABLE)
command.Then, you can assign a value to the variable.
Run the
select
again to confirm that the bind variable is now set. Note that you can also use this variable to hold results from single-row queries.