如何在pl/sql开发人员工具中替换绑定变量 [英] How to substitute bind variable in pl/sql developer tool

查看:134
本文介绍了如何在pl/sql开发人员工具中替换绑定变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在PL/SQL开发人员中运行一个SQL脚本,如下例.

I would like to run a SQL script in PL/SQL developer as following example.

variable vTest varchar2;
(exec/set) :vTest := 'ABC'
select :vTest from dual;
select :vTest ||'XYZ' from dual ;
select * from table  where columnname = :vTest;

推荐答案

您可以在测试窗口"中执行此操作.

You can do this in a Test Window.

先做

grant debug connect session to <schema> 

然后打开一个新的测试"窗口.在屏幕底部声明绑定变量.您在那里给他们命名,类型和值.

Then open a new Test window. Declare your bind variables at the bottom of the screen. You give them a name, a type and a value there.

这篇关于如何在pl/sql开发人员工具中替换绑定变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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