[SQL ] how to print sql command in oracle?

楼主: airtsubasa (伪学姊)   2014-01-07 22:20:29
请问各位先进:
假设有段PL/SQL code如下:
Declare
v_dummy VARCHAR2(1);
v_a VARCHAR2(100) :='a';
v_b VARCHAR2(100) :='b';
begin
SELECT 'x'
INTO v_dummy
FROM table_a
WHERE field_a = v_a
AND field_b = v_b;
end;
想请问一下,是否有什么方法可以把SELECT段当成String print出来吗?
每次debug都要这样一直串:
v_str := 'SELECT ....'||v_a||' AND field_b='||v_b;
字段一多,整个就很囧...

Links booklink

Contact Us: admin [ a t ] ucptt.com